Chapter 7 timer/counter units – NEC PD78214 User Manual
Page 160

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
f
CLK
= 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/f
CLK
, 0
≤ n ≤ FFFFH
INTC00 interrupt
Other interrupt program
CR00
←CR00 + 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