Datasheet

Table 19-9. Compare Output Mode, Fast PWM
COM3A[1]/
COM3B[1]
COM3A0/
COM3B[0]
Description
0 0 Normal port operation, OC3A/OC3B disconnected.
0 1 WGM3[3:0] = 14 or 15: Toggle OC3A on Compare Match, OC3B
disconnected (normal port operation). For all other WGM3
settings, normal port operation, OC3A/OC3B disconnected.
1 0 Clear OC3A/OC3B on Compare Match, set OC3A/OC3B at
BOTTOM (non-inverting mode)
1 1 Set OC3A/OC3B on Compare Match, clear OC3A/OC3B at
BOTTOM (inverting mode)
Note: 
1. A special case occurs when OCR3A/OCR3B equals TOP and COM3A[1]/COM3B[1] is set. In this
case, the compare match is ignored but the set or clear is done at BOTTOM. Refer to Fast PWM
Mode for details.
The table below shows the COM3x[1:0] bit functionality when the WGM3[3:0] bits are set to the phase
correct or the phase and frequency correct, PWM mode.
Table 19-10. Compare Output Mode, Phase Correct, and Phase and Frequency Correct PWM
COM3A[1]/
COM3B[1]
COM3A[0]/
COM3B[0]
Description
0 0 Normal port operation, OC3A/OC3B disconnected.
0 1 WGM3[3:0] = 9 or 11: Toggle OC3A on Compare Match, OC3B
disconnected (normal port operation). For all other WGM3
settings, normal port operation, OC3A/OC3B disconnected.
1 0 Clear OC3A/OC3B on Compare Match when up-counting. Set
OC3A/OC3B on Compare Match when down-counting.
1 1 Set OC3A/OC3B on Compare Match when up-counting. Clear
OC3A/OC3B on Compare Match when down-counting.
Note: 
1. A special case occurs when OCR3A/OCR3B equals TOP and COM3A[1]/COM3B[1] is set. Refer to
Phase Correct PWM Mode for details.
Bits 1:0 – WGM3[1:0] Waveform Generation Mode
Combined with the WGM3[3:2] bits found in the TCCR3B Register, these bits control the counting
sequence of the counter, the source for maximum (TOP) counter value, and what type of waveform
generation to be used. Modes of operation supported by the Timer/Counter unit are: Normal mode
(counter), Clear Timer on Compare Match (CTC) mode, and three types of Pulse Width Modulation
(PWM) modes. (See Modes of Operation).
ATmega328PB
TC1, 3, 4 - 16-bit Timer/Counter1, 3, 4 with PWM
© 2018 Microchip Technology Inc.
Datasheet Complete
DS40001906C-page 189