|
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
|
▷ |