English
Language : 

M38203M4 Datasheet, PDF (173/344 Pages) Mitsubishi Electric Semiconductor – 8-BIT SINGLE-CHIP MICROCOMPUTER
APPLICATION
2.4 Timer 1, timer 2, and timer 3
(2) Rewriting the value of the counter and the latch
When data is written to the timer, the values of the counter and the latch are rewritten. For rewriting
the values of the counters and the latches corresponding to each timer is described below.
sTimer 1 and timer 3
By writing a value to the timer, the value is set simultaneously in both the counter and the latch.
Accordingly, the counter period, when a value is written to the timer during counting, becomes inac-
curate.
Figure 2.4.2 shows an rewriting example of the counter and the latch corresponding to the timers 1
or 3.
Rewriting example of counter
•UF : Underflow
•RL : Reload
•n : The counter initial value before rewriting
•m : The counter initial value after rewriting
Write “m16” to timer
RL
m16
RL
RL
n16
UF
UF
UF
0016
Interrupt
request bit
1
Interrupt
enable bit
Inaccurate count period
1
1
Time
1 : •Clearing by writing “0” to the interrupt request bit corresponding to the timers 1 or 3.
•Clearing by accepting the interrupt request corresponding to the timers 1 or 3 when
the corresponding interrupt enable bit is “1.”
Fig. 2.4.2 Rewriting example of counter and latch corresponding to timers 1 or 3
3820 GROUP USER’S MANUAL
2–87