
358
42073A-MCU Wireless-02/13
ATmega2564/1284/644RFR2
The Timer/Counter Register gives direct access, both for read and write operations, to
the 8-bit counter unit of the Timer/Counter2. 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.
Bit 7:0 – TCNT27:20 - Timer/Counter2 Byte
21.11.6 OCR2A – Timer/Counter2 Output Compare Register A
Bit
7
6
5
4
3
2
1
0
NA ($B3)
OCR2A7:0
OCR2A
Read/Write
RW
Initial Value
0
The Output Compare Register A contains an 8-bit value that is continuously compared
with the counter value (TCNT2). A match can be used to generate an Output Compare
interrupt, or to generate a waveform output on the OC2A pin.
Bit 7:0 – OCR2A7:0 - Output Compare Register
21.11.7 OCR2B – Timer/Counter2 Output Compare Register B
Bit
7
6
5
4
3
2
1
0
NA ($B4)
OCR2B7:0
OCR2B
Read/Write
RW
Initial Value
0
The Output Compare Register B contains an 8-bit value that is continuously compared
with the counter value (TCNT2). A match can be used to generate an Output Compare
interrupt, or to generate a waveform output on the OC2B pin.
Bit 7:0 – OCR2B7:0 - Output Compare Register
21.11.8 ASSR – Asynchronous Status Register
Bit
7
6
5
4
3
2
1
0
NA ($B6)
EXCLKAMR EXCLK AS2 TCN2UB OCR2AUB OCR2BUB TCR2AUB TCR2BUB ASSR
Read/Write
RW
R
Initial
0
The register ASSR controls the asynchronous clocks for Timer/Counter2 and enables
the
asynchronous
32kHz
clock
for
the
symbol
counter.
Three
bits
(AS2,EXCLK,EXCLKAMR) are used to control the clocks. Note, to prevent clock spikes
on asynchronous clock wires, every access to ASSR should change only one of the
three bits.
Bit 7 – EXCLKAMR - Enable External Clock Input for AMR