Datasheet
Rev. 3.00, 03/04, page 333 of 830
12.9.4 Conflict between Compare-Matches A and B
If compare-matches A and B occur at the same time, the 8-bit timer operates in accordance with
the priorities for the output states set for compare-match A and compare-match B, as shown in
table 12.6.
Table 12.6 Timer Output Priorities
Output Setting Priority
Toggle output High
1 output
0 output
No change Low
12.9.5 Switching of Internal Clocks and TCNT Operation
TCNT may increment erroneously when the internal clock is switched over. Table 12.7 shows the
relationship between the timing at which the internal clock is switched (by writing to the CKS1
and CKS0 bits) and the TCNT operation.
When the TCNT clock is generated from an internal clock, the falling edge of the internal clock
pulse is detected. If clock switching causes a change from high to low level, as shown in no. 3 in
table 12.7, a TCNT clock pulse is generated on the assumption that the switchover is a falling
edge, and TCNT is incremented.
Erroneous incrementation can also happen when switching between internal and external clocks.
Table 12.7 Switching of Internal Clocks and TCNT Operation
No.
Timing of Switchover
by Means of CKS1
and CKS0 Bits
TCNT Clock Operation
1 Clock switching from low
to low level*
1
Clock before
switchover
Clock after
switchover
TCNT
clock
TCNT
CKS bit rewrite
N N + 1