English
Language : 

ATMEGA128RFA1_12 Datasheet, PDF (234/568 Pages) ATMEL Corporation – Microcontroller with Low Power 2.4GHz Transceiver for ZigBee and IEEE 802.15.4
A state change of the COM0x1:0 bits will have effect at the first Compare Match after
the bits are written. For non-PWM modes the action can be forced to have immediate
effect by using the FOC0x strobe bits.
The following table shows the COM0x1:0 bit functionality when the WGM02:0 bits are
set to a normal or CTC mode (non-PWM).
Table 17-2. Compare Output Mode, non-PWM Mode
COM0A1 COM0A0
COM0B1 COM0B0
Description
0
0
Normal port operation, OC0x disconnected;
0
1
Toggle OC0x on Compare Match;
1
0
Clear OC0x on Compare Match;
1
1
Set OC0x on Compare Match;
Table 17-3 shows the COM0x1:0 bit functionality when the WGM01:0 bits are set to fast
PWM mode.
Table 17-3. Compare Output Mode, Fast PWM Mode
COM0A1 COM0A0
COM0B1 COM0B0
Description
0
0
Normal port operation, OC0x disconnected.
WGM02 = 0: Normal Port Operation, OC0A Disconnected.
0
1
WGM02 = 1: Toggle OC0A on Compare Match.
OC0B: not applicable, reserved function;
1
0
Clear OC0x on Compare Match, set OC0x at BOTTOM, (non-
inverting mode).
1
1
Set OC0x on Compare Match, clear OC0x at BOTTOM, (inverting
mode).
Note:
A special case occurs when OCR0x equals TOP and COM0x1 is set. In this case, the
Compare Match is ignored, but the set or clear is done at BOTTOM. See "Fast PWM
Mode" on page 236.
Table 17-4 shows the COM0x1:0 bit functionality when the WGM02:0 bits are set to
phase correct PWM mode.
Table 17-4. Compare Output Mode, Phase Correct PWM Mode
COM0A1 COM0A0
COM0B1 COM0B0
Description
0
0
Normal port operation, OC0x disconnected.
WGM02 = 0: Normal Port Operation, OC0A Disconnected.
0
1
WGM02 = 1: Toggle OC0A on Compare Match.
OC0B: not applicable, reserved function;
Clear OC0x on Compare Match when up-counting. Set OC0x on
1
0
Compare Match when down-counting.
Set OC0x on Compare Match when up-counting. Clear OC0x on
1
1
Compare Match when down-counting.
Note:
A special case occurs when OCR0x equals TOP and COM0x1 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 236 for more details.
234 ATmega128RFA1
8266D-MCU Wireless-06/12