Datasheet

Table 21-4 Compare Output Mode, Fast PWM Mode
(1)
COM01 COM00 Description
0 0 Normal port operation, OC0 disconnected.
0 1 Reserved
1 0 Clear OC0 on Compare Match, set OC0 at BOTTOM,
(non-inverting mode)
1 1 Set OC0 on Compare Match, clear OC0 at BOTTOM,
(inverting mode)
Note:  1. A special case occurs when OCR0 equals TOP and COM01 is set. In this case, the Compare
Match is ignored, but the set or clear is done at BOTTOM. Refer to Fast PWM Mode on page 198 for
more details.
The table below shows the COM01:0 bit functionality when the WGM01:0 bits are set to phase correct
PWM mode.
Table 21-5 Compare Output Mode, Phase Correct PWM Mode
(1)
COM01 COM00 Description
0 0 Normal port operation, OC0 disconnected.
0 1 Reserved
1 0 Clear OC0 on Compare Match when up-counting. Set OC0 on Compare Match when
downcounting.
1 1 Set OC0 on Compare Match when up-counting. Clear OC0 on Compare Match when
downcounting.
Note:  1. A special case occurs when OCR0 equals TOP and COM01 is set. In this case, the Compare
Match is ignored, but the set or clear is done at TOP. Refer to Phase Correct PWM Mode on page 200 for
more details.
Bits 2:0 – CS0n: Clock Select [n = 2:0]
The three Clock Select bits select the clock source to be used by the Timer/Counter.
Table 21-6 Clock Select Bit Description
CS02 CS01 CS00 Description
0 0 0 No clock source (Timer/Counter stopped).
0 0 1 clk
I/O
/ (No prescaling)
0 1 0 clk
I/O
/8 (From prescaler)
0 1 1 clk
I/O
/32 (From prescaler)
1 0 0 clk
I/O
/64 (From prescaler)
1 0 1 clk
I/O
/128 (From prescaler)
1 1 0 clk
I/O
/256 (From prescaler)
1 1 1 clk
I/O
/1024 (From prescaler)
Atmel ATmega64A [DATASHEET]
Atmel-8160E-ATmega64A_Datasheet_Complete-09/2015
207