Hardware manual
Rev. 3.0, 09/98, page 177 of 361
(5) Incrementation Caused by Changing of Internal Clock Source: When an internal clock
source is changed, the changeover may cause the timer counter to increment. This depends on the
time at which the clock select bits (CKS1, CKS0) are rewritten, as shown in table 8.5.
The pulse that increments the timer counter is generated at the falling edge of the internal clock
source signal. If clock sources are changed when the old source is High and the new source is
Low, as in case No. 3 in table 8.5, the changeover generates a falling edge that triggers the TCNT
clock pulse and increments the timer counter.
Switching between an internal and external clock source can also cause the timer counter to
increment.
Table 8.5 Effect of Changing Internal Clock Sources
No. Description Timing chart
1 Low → Low
*
1
:
Clock select bits are
rewritten while both
clock sources are Low.
Old clock
source
New clock
source
TCNT clock
pulse
TCNT
CKS rewrite
N N + 1
2 Low → High
*
2
:
Clock select bits are
rewritten while old
clock source is Low and
new clock source is High.
Old clock
source
New clock
source
TCNT clock
pulse
TCNT
CKS rewrite
N N + 1
N + 2
Notes: 1. Including a transition from Low to the stopped state (CKS1 = 0, CKS0 = 0), or a
transition from the stopped state to Low.
2. Including a transition from the stopped state to High.