ATMEGA48V_11 ATMEL [ATMEL Corporation], ATMEGA48V_11 Datasheet - Page 154

no-image

ATMEGA48V_11

Manufacturer Part Number
ATMEGA48V_11
Description
8-bit Atmel Microcontroller with 4/8/16K Bytes In-System Programmable Flash
Manufacturer
ATMEL [ATMEL Corporation]
Datasheet
2545T–AVR–05/11
Table 18-3.
Note:
Table 18-4
rect PWM mode.
Table 18-4.
Note:
• 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 connected
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.
are set to a normal or CTC mode (non-PWM).
Table 18-5.
COM2A1
COM2A1
COM2B1
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 Com-
1. A special case occurs when OCR2A equals TOP and COM2A1 is set. In this case, the Com-
pare Match is ignored, but the set or clear is done at TOP. See
for more details.
pare Match is ignored, but the set or clear is done at TOP. See
page 148
shows the COM2A1:0 bit functionality when the WGM22:0 bits are set to phase cor-
Compare output mode, fast PWM mode
Compare output mode, phase correct PWM Mode
Compare output mode, non-PWM mode.
COM2A0
COM2B0
COM2A0
for more details.
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, OC0A disconnected
WGM22 = 1: Toggle OC2A on compare match
Clear OC2A on compare match, set OC2A at BOTTOM,
(non-inverting mode)
Set OC2A on compare match, clear OC2A at BOTTOM,
(inverting mode)
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
shows the COM2B1:0 bit functionality when the WGM22:0 bits
(1)
.
ATmega48/88/168
(1)
.
“Fast PWM mode” on page 146
“Phase correct PWM mode” on
154

Related parts for ATMEGA48V_11