
VIII - 9
Chapter 8
Time Base Timer / 8-bit Free-running Timer
8-bit Free-running Timer
nCount Timing of Timer Operation (Timer 6)
Binary counter counts up with the selected clock source as a count clock.
(A)
When any data is written to the compare register as the TM6CLRS flag is "0", the binary
counter is cleared to x'00'.
(B)
Even if any data is written to the compare register as the TM6CLRS flag is "1", the binary
counter is not changed.
(C)
When the binary counter reaches the value of the compare register as the TM6CLRS flag is
"1", an interrupt request flag is set at the next count clock.
(D)
When an interrupt request flag is set, the binary counter is cleared to x'00' and restarts the
counting.
(E)
Even if the binary counter reaches the value of the compare register as the TM6CLRS flag is
"0", no interrupt request flag is set.
Figure 8-3-2
Count Timing of Timer Operation (Timer 6)
M
NM
01
02
N-1
N
02/00
00
01
Count clock
TM6CLRS
flag
Compare
register
Binary
counter
Interrupt
request
flag
02
03
M-1
M
00
01
(A)
(C)
(D)
(B)
(E)
If the smaller value than the binary counter is set to the compare register at counting opera-
tion, the binary counter continues counting till overflow.
If the fx input is selected as a clock source and the value of timer 6 binary counter is read out
at operation, an incorrect value could be read out. To prevent this, select a synchronous fx as
the count clock source. But if the synchronous fx is selected as the count clock source, CPU
mode cannot return from STOP/HALT mode.
When the binary counter reaches the value in the compare register, the interrupt request flag
is set and the binary counter is cleared at the next count clock.
So set the compare register as :
Compare register setting = (count till the interrupt request -1)