
157
2545T–AVR–05/11
ATmega48/88/168
A FOC2B strobe will not generate any interrupt, nor will it clear the timer in CTC mode using
OCR2B as TOP.
The FOC2B bit is always read as zero.
Bits 5:4 – Res: Reserved bits
These bits are reserved bits in the Atmel ATmega48/88/168 and will always read as zero.
Bit 3 – WGM22: Waveform generation mode
Bit 2:0 – CS22:0: Clock select
The three Clock Select bits select the clock source to be used by the Timer/Counter, see
TableIf 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.
18.11.3
TCNT2 – Timer/counter register
The Timer/Counter Register gives direct access, both for read and write operations, to the
Timer/Counter unit 8-bit counter. Writing to the TCNT2 Register blocks (removes) the Compare
Match on the following timer clock. Modifying the counter (TCNT2) while the counter is running,
introduces a risk of missing a Compare Match between TCNT2 and the OCR2x Registers.
18.11.4
OCR2A – Output compare register A
Table 18-9.
Clock select bit description.
CS22
CS21
CS20
Description
0
No clock source (timer/counter stopped)
001
clkT2S/(no prescaling)
010
clkT2S/8 (from prescaler)
011
clkT2S/32 (from prescaler)
100
clkT2S/64 (from prescaler)
101
clkT2S/128 (from prescaler)
110
clkT2S/256 (from prescaler)
111
clk
T
2S/1024 (from prescaler)
Bit
7
65
43
21
0
TCNT2[7:0]
TCNT2
Read/write
R/W
Initial value
0
Bit
7
654
32
10
OCR2A[7:0]
OCR2A
Read/write
R/W
Initial value
0