
CHAPTER 8 8-BIT PWM TIMERS
164
User
’
s Manual U15017EJ2V0UD
8.5 Cautions on 8-Bit PWM Timers
(1) Error on starting timer
The time until the match signal is generated after the timer has been started includes an error of up to 1 clock,
because 8-bit timer counter 5n (TM5n: n = 0 or 1) is started in asynchronization with the count pulse.
Figure 8-10. Start Timing of 8-Bit Timer Counter 5n (TM5n)
(2) Operation after changing compare register during timer count operation
If the value to which the current value of 8-bit compare register 5n (CR5n) is changed is less than the value
of 8-bit timer counter 5n (TM5n), the timer continues counting, overflows, and restarts counting from 0. If the
new value of CR5n (M) is less than the old value (N), the timer must be restarted after CR5n has been changed.
Remark
n = 0 or 1
Figure 8-11. Timing After Changing Compare Register Value During Timer Count Operation
Caution Except when TIO5n input is selected, be sure to clear TCE5n to 0 to set the stop status (n
= 0 or 1).
(3) Reading TM5n during timer operation
Because the selected clock is temporarily stopped when TM5n (n = 0 or 1) is read during operation, select a
clock with a long high/low level.
When reading TM5n (n = 0 or 1) in cascade mode, provide for changes in the count during a read, for example,
by reading counts twice, comparing them, and using one of them only when they match.
00H
↑
Timer starts
01H
02H
03H
04H
Count pulse
TM5n count value
n = 0 or 1
Count pulse
CR5n
TM5n count value
N
M
X
–
1
X
FFH
00H
01H
02H
N
>
X
>
M
n = 0 or 1