131
Chapter 7 Timer/Counter Units
7
Fig. 7-27 Interrupt Request Handling for Interval Timer Operation (1)
(2) Interval timer operation (2)
The 16-bit timer/counter can be used as an interval timer that generates an interrupt at intervals of a count
time specified beforehand. (See Fig. 7-28.)
This interval timer has a resolution of 1.3
µ
s, and can count up from 1.3
µ
s to 87.4 ms (at internal system clock
fCLK = 6 MHz).
Fig. 7-29 shows the setting of control registers, and Fig. 7-30 shows the setting procedure.
Fig. 7-28 Timing of Interval Timer Operation (2)
Remark Interval = (n + 1) × 8/fCLK, 0 n FFFFH
INTC00 interrupt
Other interrupt program
CR00CR00 + n
RETI
Calculation of timer value at
which next interrupt is to occur
0H
TM0
count value
n
Compare register
(CR01)
INTC01
interrupt request
Interrupt accepted
Interval
Interrupt accepted
Cleared Cleared
n
n
Count starts
Interval