Atmel ATmega128 Manual page 160

8-bit avr microcontroller with 128k bytes in-system programmable flash
Hide thumbs Also See for ATmega128:
Table of Contents

Advertisement

Timer/Counter
Interrupt Flag Register
– TIFR
ATmega128
160
Bit
7
6
OCF2
TOV2
Read/Write
R/W
R/W
Initial Value
0
0
• Bit 7 – OCF2: Output Compare Flag 2
The OCF2 bit is set (one) when a compare match occurs between the Timer/Counter2 and the
data in OCR2 – Output Compare Register2. OCF2 is cleared by hardware when executing the
corresponding interrupt handling vector. Alternatively, OCF2 is cleared by writing a logic one to
the flag. When the I-bit in SREG, OCIE2 (Timer/Counter2 Compare Match Interrupt Enable), and
OCF2 are set (one), the Timer/Counter2 Compare Match Interrupt is executed.
• Bit 6 – TOV2: Timer/Counter2 Overflow Flag
The bit TOV2 is set (one) when an overflow occurs in Timer/Counter2. TOV2 is cleared by hard-
ware when executing the corresponding interrupt handling vector. Alternatively, TOV2 is cleared
by writing a logic one to the flag. When the SREG I-bit, TOIE2 (Timer/Counter2 Overflow Inter-
rupt 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 $00.
5
4
3
ICF1
OCF1A
OCF1B
TOV1
R/W
R/W
R/W
0
0
0
2
1
0
OCF0
TOV0
R/W
R/W
R/W
0
0
0
TIFR
2467S–AVR–07/09

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ATmega128 and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Atmega128l

Table of Contents

Save PDF