English
Language : 

M38203M4 Datasheet, PDF (185/344 Pages) Mitsubishi Electric Semiconductor – 8-BIT SINGLE-CHIP MICROCOMPUTER
APPLICATION
2.4 Timer 1, timer 2, and timer 3
2.4.3 Register setting example
Figure 2.4.13 shows an example of setting registers for timers 1, 2, and 3.
[Notes on use]
Notes 1: For using interrupt processing, set the following :
•Before setting Œ below, clear the respective timer interrupt enable bits and the
timer respective interrupt request bits to “0.”
•After setting  below, set the respective timer interrupt enable bits to “1”
(interrupts enabled).
2: The values written in the timers 1 and 3 are set into both the respective latches
and the respective counters at the same time.
3: To enable the TOUT output when the timer 2 is used, set port P56 (this port is
also used the TOUT pin) for the output mode.
4: Write values in the order of the timer 1, timer 2, and timer 3.
ŒSetting of timer 123 mode register
Select count source or others
b7
b0
T123M : Timer 123 mode register [Address 2916]
b0 : TOUT output active edge switch bit
0 : Start at “H” output
1 : Start at “L” output
b1 : TOUT output control bit
0 : TOUT output disabled
1 : TOUT output enabled
b2 : Timer 2 write control bit
0 : Write value in latch and counter
1 : Write value in latch only
b3 : Timer 2 count source selection bit
0 : Timer 1 underflow
1 : f(XIN)/16 (Middle-/high-speed mode)
f(XCIN)/16 (Low-speed mode)
b4 : Timer 3 count source selection bit
0 : Timer 1 underflow
1 : f(XIN)/16 (Middle-/high-speed mode)
f(XCIN)/16 (Low-speed mode)
b5 : Timer 1 count source selection bit
0 : f(XIN)/16 (Middle-/high-speed mode)
f(XCIN)/16 (Low-speed mode)
1 : f(XCIN)
Set count value to timer 1 (T1) [Address 2416]
ŽSet count value to timer 2 (T2) [Address 2516]
Set count value to timer 3 (T3) [Address 2616]
Fig. 2.4.13 Example of setting registers for timers 1, 2, and 3
3820 GROUP USER’S MANUAL
2–99