
355
42073A-MCU Wireless-02/13
ATmega2564/1284/644RFR2
Bit 7:3 – Res4:0 - Reserved Bit
This bit is reserved for future use. A read access always will return zero. A write access
does not modify the content.
Bit 2 – OCF2B - Output Compare Flag 2 B
The OCF2B bit is set (one) when a compare match occurs between the Timer/Counter2
and the data in OCR2B Output Compare Register2. OCF2B is cleared by hardware
when executing the corresponding interrupt handling vector. Alternatively, OCF2B is
cleared by writing a logic one to the flag. When the I-bit in SREG, OCIE2B
(Timer/Counter2 Compare Match Interrupt Enable), and OCF2B are set (one), the
Timer/Counter2 Compare Match Interrupt is executed.
Bit 1 – OCF2A - Output Compare Flag 2 A
The OCF2A bit is set (one) when a compare match occurs between the Timer/Counter2
and the data in OCR2A Output Compare Register2. OCF2A is cleared by hardware
when executing the corresponding interrupt handling vector. Alternatively, OCF2A is
cleared by writing a logic one to the flag. When the I-bit in SREG, OCIE2A
(Timer/Counter2 Compare Match Interrupt Enable), and OCF2A are set (one), the
Timer/Counter2 Compare Match Interrupt is executed.
Bit 0 – TOV2 - Timer/Counter2 Overflow Flag
The TOV2 bit is set (one) when an overflow occurs in Timer/Counter2. TOV2 is cleared
by hardware when executing the corresponding interrupt handling vector. Alternatively,
TOV2 is cleared by writing a logic one to the flag. When the SREG I-bit, TOIE2A
(Timer/Counter2
Overflow
Interrupt
Enable),
and
TOV2
are
set
(one),
the
Timer/Counter2 Overflow interrupt is executed. In PWM mode, this bit is set when
Timer/Counter2 changes counting direction at 0x00.
21.11.3 TCCR2A – Timer/Counter2 Control Register A
Bit
7
6
5
4
3
2
1
0
NA ($B0)
COM2A1 COM2A0 COM2B1 COM2B0
Res1
Res0
WGM21
WGM20
TCCR2A
Read/Write
RW
R
RW
Initial Value
0
Bit 7:6 – COM2A1:0 - Compare Match Output A Mode
These bits control the Output Compare pin (OC2A) behavior. If one or both of the
COM2A1:0 bits are set, the OC2A output overrides the normal port functionality of the
I/O pin it is connected to. However, note that the Data Direction Register (DDR) bit
corresponding to the OC2A pin must be set in order to enable the output driver. When
OC2A is connected to the pin, the function of the COM2A1:0 bits depends on the
WGM22:20 bit settings. The following table shows the COM2A1:0 bit functionality when
the WGM22:20 bits are set to a normal or CTC mode (non-PWM). Refer to section
"Compare Match Output Unit" for a description of the functionality in the other modes.
Table 21-7 COM2A Register Bits
Register Bits
Value
Description
COM2A1:0
0
Normal port operation, OC2A disconnected
1
Toggle OC2A on Compare Match
2
Clear OC2A on Compare Match