
Capture/Compare Timer
Timer Operation
MC68HC705C8A
—
Rev. 3
Technical Data
MOTOROLA
Capture/Compare Timer
93
8.3.2 Output Compare
The output compare function can generate an output signal when the
16-bit counter reaches a selected value. Software writes the selected
value into the output compare registers. On every fourth internal clock
cycle the output compare circuitry compares the value of the counter to
the value written in the output compare registers. When a match occurs,
the timer transfers the programmable output level bit (OLVL) from the
timer control register to the output compare pin (TCMP).
Software can use the output compare register to measure time periods,
to generate timing delays, or to generate a pulse of specific duration or
a pulse train of specific frequency and duty cycle on the TCMP pin.
Figure 8-4
shows the logic of the output compare function.
Figure 8-4. Output Compare Operation
16-BIT COMPARATOR
OUTPUT COMPARE REGISTER HIGH
OUTPUT COMPARE REGISTER LOW
COUNTER HIGH BYTE
COUNTER LOW BYTE
PIN
CONTROL
LOGIC
TCMP
TIMER STATUS REGISTER
TIMER STATUS REGISTER
15
0
15
8
7
0
TIMER
INTERRUPT
REQUEST
I
O
T
I
O
T
$0012
$0013
$0016
$0017