Table 46, Atmega8515(l) – Rainbow Electronics ATmega8515L User Manual
Page 89
89
ATmega8515(L)
2512A–AVR–04/02
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. See “Fast PWM Mode”
on page 83 for more details.
Table 47 shows the COM01:0 bit functionality when the WGM01:0 bits are set to phase
correct PWM 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 TOP. See “Phase Correct
PWM Mode” on page 85 for more details.
• Bit 2:0 – CS02:0: Clock Select
The three Clock Select bits select the clock source to be used by the Timer/Counter.
If external pin modes are used for the Timer/Counter0, transitions on the T0 pin will
clock the counter even if the pin is configured as an output. This feature allows software
control of the counting.
Table 46. Compare Output Mode, Fast PWM Mode
COM01
COM00
Description
0
0
Normal port operation, OC0 disconnected.
0
1
Reserved
1
0
Clear OC0 on compare match, set OC0 at TOP.
1
1
Set OC0 on compare match, clear OC0 at TOP.
Table 47. Compare Output Mode, Phase Correct PWM Mode
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.
Table 48. 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
/64 (From prescaler)
1
0
0
clk
I/O
/256 (From prescaler)
1
0
1
clk
I/O
/1024 (From prescaler)
1
1
0
External clock source on T0 pin. Clock on falling edge.
1
1
1
External clock source on T0 pin. Clock on rising edge.