English
Language : 

M38B5XMXH Datasheet, PDF (108/355 Pages) Mitsubishi Electric Semiconductor – 8-BIT SINGLE-CHIP MICROCOMPUTER
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(XIN) = 4.19 MHz (222 Hz) is divided by the timer.
•The timer 3 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 244 µs to execute processing of other interrupts.
Figure 2.2.15 shows the timers connection and setting of division ratios; Figure 2.2.16 shows the
relevant registers setting; Figure 2.2.17 shows the control procedure.
f(XIN)
4.19 MHz
Timer 1
Timer 2
Timer 3
Timer 3 interrupt request bit
1/16
1/64
1/256
1/16
0/1
1 second
0/1 244 µs
Timer 1 interrupt
request bit
0 : No interrupt request issued
1 : Interrupt request issued
Fig. 2.2.15 Timers connection and setting of division ratios
2-20
38B5 Group User’s Manual