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

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
15.8
15.8.1
7766A–AVR–03/08
8-bit Timer/Counter Register Description
Timer/Counter Control Register A – TCCR2A
Figure 15-11. Timer/Counter Timing Diagram, Clear Timer on Compare Match mode, with Pres-
• Bits 7:6 – COM2A1:0: Compare Match Output A Mode
These bits control the Output Compare pin (OC2A) behavior. If one or both of the COM2A1:0
bits are set, the OC2A 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 OC2A pin
must be set in order to enable the output driver.
When OC2A is connected to the pin, the function of the COM2A1:0 bits depends on the
WGM22:0 bit setting.
are set to a normal or CTC mode (non-PWM).
Table 15-1.
Bit
Read/Write
Initial Value
COM2A1
0
0
1
1
TCNTn
(clk
(CTC)
OCRnx
OCFnx
clk
clk
I/O
I/O
Tn
/8)
7
COM2A
1
R/W
0
caler (f
Compare Output Mode, non-PWM Mode
COM2A0
0
1
0
1
clk_I/O
Table 15-1
6
COM2A
0
R/W
0
TOP - 1
/8)
Description
Normal port operation, OC0A disconnected.
Toggle OC2A on Compare Match
Clear OC2A on Compare Match
Set OC2A on Compare Match
5
COM2B
1
R/W
0
shows the COM2A1:0 bit functionality when the WGM22:0 bits
4
COM2B
0
R/W
0
TOP
3
R
0
TOP
2
R
0
BOTTOM
R/W
1
WGM2
1
0
ATmega32U4
0
WGM2
0
R/W
0
BOTTOM + 1
TCCR2A
149

Related parts for atmega32u4-16mu