
91
ATtiny40 [DATASHEET]
8263B–AVR–01/2013
Bit 6 – Res: Reserved Bit
This bit is reserved and will always read as zero.
Bit 5 – OCF1B: Output Compare Flag 1 B
The OCF1B bit is set when a Compare Match occurs between the Timer/Counter and the data in OCR1B – Output
Compare Register1 B. OCF1B is cleared by hardware when executing the corresponding interrupt handling vector.
Alternatively, OCF1B is cleared by writing a logic one to the flag. When the I-bit in SREG, OCIE1B (Timer/Counter
Compare B Match Interrupt Enable), and OCF1B are set, the Timer/Counter Compare Match Interrupt is executed.
The OCF1B is not set in 16-bit Output Compare mode when the Output Compare Register OCR1B is used as the
high byte of the 16-bit Output Compare Register or in 16-bit Input Capture mode when the Output Compare Regis-
ter OCR1B is used as the high byte of the Input Capture Register.
Bit 4 – OCF1A: Output Compare Flag 1 A
The OCF1A bit is set when a Compare Match occurs between the Timer/Counter1 and the data in OCR1A – Out-
put Compare Register1. OCF1A is cleared by hardware when executing the corresponding interrupt handling
vector. Alternatively, OCF1A is cleared by writing a logic one to the flag. When the I-bit in SREG, OCIE1A
(Timer/Counter1 Compare Match Interrupt Enable), and OCF1A are set, the Timer/Counter1 Compare Match Inter-
rupt is executed.
The OCF1A is also set in 16-bit mode when a Compare Match occurs between the Timer/Counter and 16-bit data
in OCR1B/A. The OCF1A is not set in Input Capture mode when the Output Compare Register OCR1A is used as
an Input Capture Register.
Bit 3 – TOV1: Timer/Counter1 Overflow Flag
The bit TOV1 is set when an overflow occurs in Timer/Counter1. TOV1 is cleared by hardware when executing the
corresponding interrupt handling vector. Alternatively, TOV1 is cleared by writing a logic one to the flag. When the
SREG I-bit, TOIE1 (Timer/Counter1 Overflow Interrupt Enable), and TOV1 are set, the Timer/Counter1 Overflow
interrupt is executed.