8-bit AVR Microcontrollers

Compare Output Mode and Waveform Generation

The waveform generator uses the COM2x[1:0] bits differently in normal, CTC, and PWM modes. For all modes, setting the COM2x[1:0] = 0 tells the waveform generator that no action on the OC2x register is to be performed on the next compare match. Refer also to the descriptions of the output modes.

A change of the COM2x[1: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 an immediate effect by using the FOC2x strobe bits.