atmega32u4-16mu ATMEL Corporation, atmega32u4-16mu Datasheet - Page 151

no-image

atmega32u4-16mu

Manufacturer Part Number
atmega32u4-16mu
Description
Atmega32u4 8-bit Avr Microcontroller With 32k Bytes Of Isp Flash And Usb Controller
Manufacturer
ATMEL Corporation
Datasheet
7766A–AVR–03/08
Table 15-5
mode.
Table 15-5.
Note:
Table 15-6
rect PWM mode.
Table 15-6.
Note:
• Bits 3, 2 – Res: Reserved Bits
These bits are reserved bits in the ATmega32U4 and will always read as zero.
• Bits 1:0 – WGM21:0: Waveform Generation Mode
Combined with the WGM22 bit found in the TCCR2B Register, these bits control the counting
sequence of the counter, the source for maximum (TOP) counter value, and what type of wave-
form generation to be used, see
unit are: Normal mode (counter), Clear Timer on Compare Match (CTC) mode, and two types of
Pulse Width Modulation (PWM) modes (see
Table 15-7.
Mode
COM2B1
COM2B1
0
1
2
0
0
1
1
0
0
1
1
1. A special case occurs when OCR2B equals TOP and COM2B1 is set. In this case, the Com-
1. A special case occurs when OCR2B equals TOP and COM2B1 is set. In this case, the Com-
WGM2
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 146
shows the COM2B1:0 bit functionality when the WGM22:0 bits are set to phase cor-
shows the COM2B1:0 bit functionality when the WGM22:0 bits are set to fast PWM
0
0
0
Compare Output Mode, Fast PWM Mode
Compare Output Mode, Phase Correct PWM Mode
Waveform Generation Mode Bit Description
COM2B0
COM2B0
WGM1
0
1
0
1
0
1
0
1
for more details.
0
0
1
Description
Normal port operation, OC2B disconnected.
Reserved
Clear OC2B on Compare Match, set OC2B at TOP
Set OC2B on Compare Match, clear OC2B at TOP
Description
Normal port operation, OC2B disconnected.
Reserved
Clear OC2B on Compare Match when up-counting. Set OC2B on
Compare Match when down-counting.
Set OC2B on Compare Match when up-counting. Clear OC2B on
Compare Match when down-counting.
WGM0
0
1
0
Table
Timer/Counter
Mode of
Operation
Normal
PWM, Phase
Correct
CTC
15-7. Modes of operation supported by the Timer/Counter
“Modes of Operation” on page
OCRA
0xFF
0xFF
TOP
(1)
Immediate
Immediate
Update of
OCRx at
(1)
TOP
“Fast PWM Mode” on page 144
“Phase Correct PWM Mode” on
ATmega32U4
143).
Set on
TOV Flag
BOTTOM
MAX
MAX
(1)(2)
151

Related parts for atmega32u4-16mu