Datasheet

Section 10 8-Bit Timers
Rev.7.00 Feb. 14, 2007 page 402 of 1108
REJ09B0089-0700
φ
External clock
input pin
Clock input
to TCNT
TCNT
N1 N N+1
Figure 10.3 Count Timing for External Clock Input
10.3.2 Compare Match Timing
Setting of Compare Match Flags A and B (CMFA, CMFB): The CMFA and CMFB flags in
TCSR are set to 1 by a compare match signal generated when the TCOR and TCNT values match.
The compare match signal is generated at the last state in which the match is true, just before the
timer counter is updated.
Therefore, when TCOR and TCNT match, the compare match signal is not generated until the
next incrementation clock input. Figure 10.4 shows this timing.
φ
TCNT
N N+1
TCOR N
Compare match
signal
CMF
Figure 10.4 Timing of CMF Setting