138
µ
PD17062
12.3.2 Timer Error Caused by the BTM0CY Flag
There are two types of timer error that can occur because of the BTM0CY flag. One type depends on the
timing when the BTM0CY flag is checked, and the other type occurs when the timer carry FF setting interval
is changed.
These types of timer error are detailed below.
(1) Timer error by BTM0CY flag check timing
As described in Section 12.3.1, the time interval at which the BTM0CY flag is checked must be less than
the time interval at which the timer carry FF is set to 1.
Suppose the time interval at which the BTM0CY flag is checked is tCHECK, and the time interval (100 ms or
5 ms) at which timer carry FF is set is tSET. The relationship between these two intervals must be as follows:
tCHECK < tSET
Under this condition, as shown in Fig. 12-4, the timer error that depends on the timing when the BTM0CY
flag is checked is as follows:
0 < error < tCHECK
Fig. 12-4 Timer Error That Depends on the Time Interval at Which the BTM0CY Flag Is Checked
As shown in Fig. 12-4, when the BTM0CY flag is checked at , it appears to be 1 and causes the timer to
be updated. When it is checked at , it appears to be 0, and defers the updating of the timer until it is checked
again at . In this case, the timer count is increased by tCHECK3.
SKT1
BTM0CY
SKT1
BTM0CY
SKT1
BTM0CY
SKT1
BTM0CY
Timer carry FF set pulse
BTM0CY flag
t
SET
t
CHECK
t
CHECK2
t
CHECK3