English
Language : 

MC68HC11PH8 Datasheet, PDF (169/264 Pages) Motorola, Inc – High-density Complementary Metal Oxide Semiconductor (HCMOS) Microcomputer Unit
8.3
8-bit modulus timers
The MC68HC11PH8 has three 8-bit modulus timers: A, B and C. These timers can generate a
wide range of low-frequency, periodic interrupts. In addition, timer A may be used as a clock
source for the LCD segments, the COP watchdog system and the real time interrupt (RTI), in
applications using PLL clock generation.
Each modulus timer consists of an 8-bit down-counter, an 8-bit modulus register and a load
mechanism. Only the 8-bit modulus register may be written to in software. Each timer is configured
by an associated control register that enables and flags interrupts, and selects the clock source
for the down-counter. Figure 8-7 provides a block diagram of the modulus timers.
8.3.1 Modulus timer operation
The down-counter in each timer contains a value which is decremented at a preselected clock
rate. When this counter value reaches $00 (‘underflow’), an output pulse is generated and, if
enabled, a hardware interrupt is requested. At this point, a new value is loaded into the
down-counter from the modulus register; at the next clock, the counter will contain this value minus
one.
Note:
For all three timers, modulus register values of $00 or $01 should be avoided.
Because modulus timer A is used to clock the COP monitor and cannot be stopped, the
8
loading mechanism on modulus timer A is inhibited for values of $00 or $01; at
underflow, the counter will roll over from $00 to $FF and continue decrementing.
The frequency that is output from the timer is equal to the clock frequency divided by the value in
the 8-bit modulus register; a modulus register value of n generates a modulus timer underflow
every n input clocks. Therefore, the modulus timer can divide an input frequency by any value from
2 to 255. In addition, the timer A clock output is further divided by two to give the CLK64 signal.
There are several software-selectable input clocks for the modulus timers (see Section 8.3.2 and
Figure 8-7). For example, the modulus timer A clock source can be EXTALi, EXTALi/4 or EXTALi/8.
Consequently, CLK64 can vary in frequency from EXTALi/4 (EXTALi ÷ 2 ÷ 2) to EXTALi/4080
(EXTALi/8 ÷ 255 ÷ 2). The following table provides an example of how to obtain a 64Hz frequency
from various EXTALi values, using timer A.
EXTALi
32 kHz
32.768 kHz
38.4 kHz
Modulus timer A
Input clock Modulus register
EXTALi
$FA
EXTALi/4
$40
EXTALi/4
$46
Output
64 Hz
64 Hz
64 Hz
MC68HC11PH8
TIMING SYSTEM
TPG
MOTOROLA
8-35