Datasheet
147
7766E–AVR–04/10
ATmega16U4/ATmega32U4
Figure 15-9. Compare Match Output Unit, Schematic
15.6.1 Compare Output Mode and Waveform Generation
The Waveform Generator uses the COM4x1:0 bits differently in Normal mode and PWM modes.
For all modes, setting the COM4x1:0 = 0 tells the Waveform Generator that no action on the
OCW4x Output is to be performed on the next Compare Match. For compare output actions in
the non-PWM modes refer to Table 15-6 on page 162. For fast PWM mode, refer to Table 15-7
on page 162, and for the Phase and Frequency Correct PWM refer to Table 15-8 on page 163.
A change of the COM4x1:0 bits state will have effect at the first Compare Match after the bits are
written. For non-PWM modes, the action can be forced to have immediate effect by using the
FOC4x strobe bits.
DATA BUS
PORTC6
DDRC6
DQ
DDRC7
PORTC7
DQ
DQ
DQ
clk
I/O
PORTB5
DDRB5
D
Q
DDRB6
PORTB6
D
Q
D
Q
D
Q
PORTD6
DDRD6
DQ
DDRD7
PORTD7
DQ
DQ
DQ
1
0
1
0
OC4D
PIN
2
1
0
Dead Time
Generator D
Q
Q
OCW4D
clk
Tn
OC4D
PIN
Output Compare
Pin Configuration
COM4D1:0
WGM41
OC4OE5:4
1
0
1
0
1
0
OC4B
PIN
2
1
0
Dead Time
Generator B
Q
Q
OCW4B
clk
Tn
OC4B
PIN
Output Compare
Pin Configuration
COM4B1:0
WGM41
OC4OE3:2
1
0
1
0
OC4A
PIN
0
1
Dead Time
Generator A
Q
Q
OCW4A
clk
Tn
OC4A
PIN
Output Compare
Pin Configuration
COM4A1:0
WGM41
OC4OE1:0
1
0
OC4A
OC4A
OC4B
OC4B
OC4
OC4D