ATmega88PA Automotive Atmel Corporation, ATmega88PA Automotive Datasheet - Page 159

no-image

ATmega88PA Automotive

Manufacturer Part Number
ATmega88PA Automotive
Description
Manufacturer
Atmel Corporation
9223B–AVR–09/11
Table 18-4
correct PWM mode.
Table 18-4.
• Bits 5:4 – COM2B1:0: Compare Match Output B Mode
These bits control the Output Compare pin (OC2B) behavior. If one or both of the COM2B1:0
bits are set, the OC2B output overrides the normal port functionality of the I/O pin it is con-
nected to. However, note that the Data Direction Register (DDR) bit corresponding to the
OC2B pin must be set in order to enable the output driver.
When OC2B is connected to the pin, the function of the COM2B1:0 bits depends on the
WGM22:0 bit setting.
bits are set to a normal or CTC mode (non-PWM).
Table 18-5.
Table 18-6
mode.
Table 18-6.
Note:
Note:
COM2A1
COM2B1
COM2B1
Atmel ATmega48PA/88PA/168PA [Preliminary]
0
0
1
1
0
0
1
1
0
0
1
1
1. A special case occurs when OCR2A equals TOP and COM2A1 is set. In this case, the
1. A special case occurs when OCR2B equals TOP and COM2B1 is set. In this case, the
shows the COM2B1:0 bit functionality when the WGM22:0 bits are set to fast PWM
shows the COM2A1:0 bit functionality when the WGM22:0 bits are set to phase
Compare Match is ignored, but the set or clear is done at TOP. See
Mode” on page 152
Compare Match is ignored, but the set or clear is done at BOTTOM. See
PWM Mode” on page 152
Compare Output Mode, Phase Correct PWM Mode
Compare Output Mode, non-PWM Mode
Compare Output Mode, Fast PWM Mode
COM2A0
COM2B0
COM2B0
0
1
0
1
0
1
0
1
0
1
0
1
Table 18-5
Description
Normal port operation, OC2A disconnected.
WGM22 = 0: Normal Port Operation, OC2A Disconnected.
WGM22 = 1: Toggle OC2A on Compare Match.
Clear OC2A on Compare Match when up-counting. Set OC2A on
Compare Match when down-counting.
Set OC2A on Compare Match when up-counting. Clear OC2A on
Compare Match when down-counting.
Description
Normal port operation, OC2B disconnected.
Toggle OC2B on Compare Match
Clear OC2B on Compare Match
Set OC2B on Compare Match
Description
Normal port operation, OC2B disconnected.
Reserved
Clear OC2B on Compare Match, set OC2B at BOTTOM,
(non-inverting mode).
Set OC2B on Compare Match, clear OC2B at BOTTOM,
(inverting mode).
for more details.
shows the COM2B1:0 bit functionality when the WGM22:0
for more details.
(1)
(1)
“Phase Correct PWM
“Phase Correct
159

Related parts for ATmega88PA Automotive