Setting Procedure For Interval Timer Operation (1); Interrupt Request Handling For Interval Timer Operation (1) - NEC PD78212 User Manual

8-bit single-chip microcomputer sub-series
Table of Contents

Advertisement

Fig. 7-58 Interrupt Request Handling for Interval Timer Operation (1)
(2) Interval timer operation (2)
Eight-bit timer/counter 1 can be used as an interval timer that generates an interrupt at intervals of a count
time specified beforehand. (See Fig. 7-59.)
Fig. 7-60 shows the setting of control registers, and Fig. 7-61 shows the setting procedure.
Fig. 7-57 Setting Procedure for Interval Timer Operation (1)
Set PRM1 register
Set count value in CR10 register
Calculation of timer value at
which next interrupt is to occur
Chapter 7 Timer/Counter Units
Interval timer (1)
CR10←n
Set CRC1 register
CRC1←00H
Start counting
; Sets bit 3 of TMC1 to 1
CE1←1
INTC10 interrupt
INTC10 interrupt
CR10←CR10 + n
Other interrupt program
RETI
7
153

Advertisement

Table of Contents
loading

Table of Contents