Datasheet

328
Output selection
Select waveform
output mode
Select
output timing
Start counting
1
2
3
Figure 12.10 Procedure for Selecting Compare Match Waveform Output Operation
Waveform Output Operation (0 Output/1 Output): Figure 12.11 shows 0 output/1 output. In
the example, TCNT is a free-running counter, 1 is output upon compare-match A and 0 is output
upon compare-match B. When the pin level matches the set level, the pin level does not change.
H'FFFF
H'0000
TIOCA
TCNT value
Time
TGRA
TGRB
TIOCB
Does not change Does not change 1 output
Does not change Does not change
0 output
Figure 12.11 Example of 0 Output/1 Output
Waveform Output Operation (Toggle Output): Figure 12.12 shows the toggle output. In the
example, the TCNT operates as a periodic counter cleared by compare-match B, with toggle
output at both compare-match A and compare-match B.