Rev. 2.0, 03/02, page 144 of 298
11.5
Operation Timing
11.5.1
TCNT Count Timing
Figure 11.14 shows the TCNT count timing when the internal clock source is selected. Figure
11.15 shows the timing when the external clock source is selected. The pulse width of the external
clock signal must be at least two system clock (
φ
) cycles; shorter pulses will not be counted
correctly.
TCNT
TCNT input
clock
Internal
clock
φ
N
N+1
N+2
Rising edge
Figure 11.14 Count Timing for Internal Clock Source
TCNT
TCNT input
clock
External
clock
φ
N
N+1
N+2
Rising edge
Rising edge
Figure 11.15 Count Timing for External Clock Source
11.5.2
Output Compare Output Timing
The compare match signal is generated in the last state in which TCNT and GR match (when
TCNT changes from the matching value to the next value). When the compare match signal is
generated, the output value selected in TIOR is output at the compare match output pin (FTIOA,
FTIOB, FTIOC, or FTIOD).
When TCNT matches GR, the compare match signal is generated only after the next counter clock
pulse is input.