CHAPTER 6 PERIPHERAL HARDWARE FUNCTION
176 Users Manual U10676EJ3V0UM
(4) Operation after changing modulo registerThe contents of the timer counter modulo register (TMODn) and high-level period setting timer counter moduloregister (TMOD2H) are changed as soon as an 8-bit data memory manipulation instruction has been executed.
n
Rewrite instruction
Count pulse (CP)
Timer counter
modulo register
(TMODn)
High-level period
setting timer counter
modulo register
(TMOD2H)
m
n
Timer counter
count register (Tn)
Match signal Match signal
01 m 0
If the value of TMODn after the change is less than the value of the timer counter count register (Tn), Tncontinues counting. When an overflow occurs, Tn starts counting again from 0. If the values of TMODn andTMOD2H after the change are less than the values before change (n), it is necessary to restart the timer afterchanging TMODn and TMOD2H.
n
Count pulse (CP)
Timer counter
modulo register
(TMODn)
High-level period setting
timer counter
modulo register
(TMOD2H)
m
x 1
Timer counter
count register (Tn)
n > x > m
x01255