17.14.9 Timer/Counter0 Interrupt Flag Register

Name: TIFR0
Offset: 0x2A
Reset: 0x00

Bit 76543210 
   ICF0  OCF0BOCF0ATOV0 
Access R/WR/WR/WR/W 
Reset 0000 

Bit 5 – ICF0 Timer/Counter0, Input Capture Flag

This flag is set when a capture event occurs on the ICP0 pin. When the Input Capture Register (ICR0) is set by the WGM0[3:0] to be used as the TOP value, the ICF0 Flag is set when the counter reaches the TOP value.

ICF0 is automatically cleared when the Input Capture Interrupt Vector is executed. Alternatively, ICF0 can be cleared by writing a logic one to its bit location.

Bit 2 – OCF0B Timer/Counter0, Output Compare B Match Flag

This flag is set in the timer clock cycle after the counter (TCNT0) value matches the Output Compare Register B (OCR0B).

Note that a Forced Output Compare (FOC0B) strobe will not set the OCF0B Flag.

OCF0B is automatically cleared when the Output Compare Match B Interrupt Vector is executed. Alternatively, OCF0B can be cleared by writing a logic one to its bit location.

Bit 1 – OCF0A Timer/Counter0, Output Compare A Match Flag

This flag is set in the timer clock cycle after the counter (TCNT0) value matches the Output Compare Register A (OCR0A).

Note that a Forced Output Compare (FOC0A) strobe will not set the OCF0A Flag.

OCF0A is automatically cleared when the Output Compare Match A Interrupt Vector is executed. Alternatively, OCF0A can be cleared by writing a logic one to its bit location.

Bit 0 – TOV0 Timer/Counter0, Overflow Flag

The setting of this flag is dependent of the WGM0[3:0] bits setting. In Normal and CTC modes, the TOV0 Flag is set when the timer overflows. Refer to Table 17-6 for the TOV0 Flag behavior when using another WGM0[3:0] bit setting.

TOV0 is automatically cleared when the Timer/Counter0 Overflow Interrupt Vector is executed. Alternatively, TOV0 can be cleared by writing a logic one to its bit location.