192
µ
PD78214 Sub-Series
Fig. 7-99 Interrupt Request Handling for Interval Timer Operation (1)
(2) Interval timer operation (2)
Eight-bit timer/counter 2 can be used as an interval timer that generates an interrupt at intervals of a count
time specified beforehand. (See Fig. 7-100.)
Fig. 7-101 shows the setting of control registers, and Fig. 7-102 shows the setting procedure.
Fig. 7-100 Timing of Interval Timer Operation (2)
Remark Interval = (n + 1) × x/fCLK, 0 n FFH
x = 16, 32, 64, 128, 256, 512
INTC20 interrupt
Other interrupt program
CR20CR20 + n
RETI
Calculation of timer value at
which next interrupt is to occur
0H
TM2
count value
n
Compare register
(CR21)
INTC21
interrupt request
Interrupt accepted
Interval
Interrupt accepted
Cleared Cleared
n
n
Count starts
Interval