English
Language : 

7641_06 Datasheet, PDF (152/385 Pages) Renesas Technology Corp – 8-BIT SINGLE-CHIP MICROCOMPUTER
7641 Group
APPLICATION
2.2 Timer
(2) Timer application example 1: Clock function (measurement of 1 s)
Outline: The input clock is divided by the timer so that the clock can count up at 1 s intervals.
Specifications: •The clock f(XCIN) = 32 kHz is divided by the timer.
•The timer 2 interrupt request bit is checked in main routine, and if the interrupt
request is issued, the clock is counted up.
• The timer 1 interrupt occurs every 10 ms to execute processing of other interrupts.
Figure 2.2.12 shows the timers connection and setting of division ratios; Figure 2.2.13 shows the
related registers setting; Figure 2.2.14 shows the control procedure.
f(XCIN)
32 kHz
Timer 1
Timer 2
Timer 2 interrupt request bit
1/2
1/160
1/100
0/1
1s
0/1 10 ms
Timer 1 interrupt
request bit
0 : No interrupt request issued
1 : Interrupt request issued
Fig. 2.2.12 Timers connection and setting of division ratios
Rev.2.00 Aug 28, 2006 page 21 of 148
REJ09B0336-0200