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

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
16.12 Register Description
16.12.1
7766A–AVR–03/08
TCCR4A – Timer/Counter4 Control Register A
• Bits 7,6 - COM4A1, COM4A0: Comparator A Output Mode, Bits 1 and 0
These bits control the behavior of the Waveform Output (OCW4A) and the connection of the
Output Compare pin (OC4A). If one or both of the COM4A1:0 bits are set, the OC4A output
overrides the normal port functionality of the I/O pin it is connected to. The complementary
OC4B output is connected only in PWM modes when the COM4A1:0 bits are set to “01”. Note
that the Data Direction Register (DDR) bit corresponding to the OC4A and OC4A pins must be
set in order to enable the output driver.
The function of the COM4A1:0 bits depends on the PWM4A, WGM40 and WGM41 bit settings.
Table 16-6
(non-PWM).
Table 16-6.
Table 16-7
are set to fast PWM mode.
Table 16-7.
Bit
Read/Write
Initial value
COM4A1..0
COM4A1..0
00
01
10
11
00
01
10
11
shows the COM4A1:0 bit functionality when the PWM4A, WGM40 and WGM41 bits
shows the COM4A1:0 bit functionality when the PWM4A bit is set to Normal Mode
COM4A1
Compare Output Mode, Normal Mode (non-PWM)
Compare Output Mode, Fast PWM Mode
R/W
OCW4A Behavior
Normal port operation.
Toggle on Compare Match.
Clear on Compare Match.
Set on Compare Match.
OCW4A Behavior
Normal port operation.
Cleared on Compare Match.
Set when TCNT4 = 0x000.
Cleared on Compare Match.
Set when TCNT4 = 0x000.
Set on Compare Match.
Cleared when TCNT4 = 0x000.
7
0
COM4A0
R/W
6
0
COM4B1
R/W
5
0
COM4B0
R/W
4
0
FOC4A
W
3
0
FOC4B
W
2
0
Disconnected
Disconnected
Connected
Connected
Connected
Connected
Connected
Connected
OC4A Pin
OC4A
PWM4A
ATmega32U4
R/W
1
0
PWM4B
R/W
0
0
Disconnected
Disconnected
Disconnected
Disconnected
Disconnected
Disconnected
Disconnected
Connected
OC4A Pin
OC4A
TCCR4A
181

Related parts for atmega32u4-16mu