Table 43. Compare Output Mode, Non-PWM Mode
COM21
COM20
Description
0
0
1
1
0
1
0
1
Normal port operation, OC2 disconnected.
Toggle OC2 on Compare Match
Clear OC2 on Compare Match
Set OC2 on Compare Match
Table 44 shows the COM21:0 bit functionality when the WGM21:0 bits are set to fast
PWM mode.
Table 44. Compare Output Mode, Fast PWM Mode(1)
COM21
COM20
Description
0
0
1
1
0
1
0
1
Normal port operation, OC2 disconnected.
Reserved
Clear OC2 on Compare Match, set OC2 at TOP
Set OC2 on Compare Match, clear OC2 at TOP
Note:
1. A special case occurs when OCR2 equals TOP and COM21 is set. In this case, the
Compare Match is ignored, but the set or clear is done at TOP. See “Fast PWM
Mode” on page 110 for more details.
Table 45 shows the COM21:0 bit functionality when the WGM21:0 bits are set to phase
correct PWM mode.
Table 45. Compare Output Mode, Phase Correct PWM Mode(1)
COM21 COM20 Description
0
0
0
1
Normal port operation, OC2 disconnected.
Reserved
Clear OC2 on Compare Match when up-counting. Set OC2 on Compare
Match when downcounting.
1
1
0
1
Set OC2 on Compare Match when up-counting. Clear OC2 on Compare
Match when downcounting.
Note:
1. A special case occurs when OCR2 equals TOP and COM21 is set. In this case, the
Compare Match is ignored, but the set or clear is done at TOP. See “Phase Correct
PWM Mode” on page 111 for more details.
116
ATmega8(L)
2486M–AVR–12/03