Motorola Axiom CMD11E1 Betriebsanweisung Seite 73

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 101
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 72
Chapter 6
Timing using Polling
6.1 Objective
Introduces polling timer overflow flag to create a simple clock and to generate
ON-OFF output signals.
6.2 Getting started
Make sure you have made the external connections show in figures 3.1 and 3.2
before proceeding further.
6.3 Timing
In this part of the lab, we will monitor the TOF flag. This flag is controlled by the
free running counter. The free running counter is a 16 bit counter that counts the
clock ticks. It is set to $0000 on power up. It counts up to $FFFFand then rolls
over to $0000 and the process is repeated until you power off the HC11. Every
time the counter rolls over, it sets the TOF flag. This flag is not automatically
reset and it is your responsibility to reset it in your code depending on your need.
To reset the flag you have to write a 1 to it
1
.
Your HC11 most likely uses a 8 MHz crystal which means that the processor
speed is 2 MHz, or you get 2 × 10
6
clock ticks every second. The free running
counter rolls over every 2
16
ticks, or you get
2 × 10
6
2
16
= 30.52 overflows every second
1
This is true of all HC11 flags. You reset a flag, i.e. make it go to zero, by writing a 1 to it!
73
Seitenansicht 72
1 2 ... 68 69 70 71 72 73 74 75 76 77 78 ... 100 101

Kommentare zu diesen Handbüchern

Keine Kommentare