Owner manual

121
ATmega8515(L)
2512A–AVR–04/02
Bit 6 – OCIE1A: Timer/Counter1, Output Compare A Match Interrupt Enable
When thisbit iswrittentoone, and the I-flag in the Status Register isset (interrupts glo-
bally enabled), theTimer/Counter1 Output CompareAMatch interruptis enabled.The
corresponding InterruptVector(see Interrupts”onpage 51) is executedwhen the
OCF1A flag,located in TIFR, isset.
Bit 5 – OCIE1B: Timer/Counter1, Output Compare B Match Interrupt Enable
When thisbit iswrittentoone, and the I-flag in the Status Register isset (interrupts glo-
bally enabled), theTimer/Counter1 Output Compare BMatch interruptis enabled.The
corresponding InterruptVector(see Interrupts”onpage 51) is executedwhen the
OCF1Bflag,located in TIFR, isset.
Bit 3 – TICIE1: Timer/Counter1, Input Capture Interrupt Enable
When thisbit iswrittentoone, and the I-flag in the Status Register isset (interrupts glo-
bally enabled), theTimer/Counter1input captureinterruptis enabled.The
corresponding InterruptVector(see “Interrupts”onpage 51) is executedwhen the ICF1
flag,located in TIFR, isset.
Timer/Counter Interrupt Flag
Register – TIFR
(1)
Note: 1. Thisregistercontainsflag bitsforseveral Timer/Counters, but only Timer1 bits are
described in thissection. The remaining bits are described in theirrespective timer
sections.
Bit 7 – TOV1: Timer/Counter1, Overflow Flag
The setting of thisflag isdependent of the WGM13:0 bitssetting. In Normal andCTC
modes, theTOV1 flag isset when thetimer overflows.Refer to Table53 on page 118
for theTOV1 flag behaviorwhen using anotherWGM13:0 bit setting.
TOV1 is automatically clearedwhen theTimer/Counter1 OverflowInterruptVector is
executed.Alternatively, TOV1 can be clearedbywriting a logic one to itsbit location.
Bit 6 – OCF1A: Timer/Counter1, Output Compare A Match Flag
Thisflag isset in thetimerclock cycleafter the counter(TCNT1) value matches the Out-
put Compare Register A (OCR1A).
Note that a ForcedOutput Compare (FOC1A)strobe will not set the OCF1A flag.
OCF1A is automatically clearedwhen the Output compare Match A InterruptVector is
executed.Alternatively, OCF1A can be clearedbywriting a logic one to itsbit location.
Bit 5 – OCF1B: Timer/Counter1, Output Compare B Match Flag
Thisflag isset in thetimerclock cycleafter the counter(TCNT1) value matches the Out-
put Compare RegisterB(OCR1B).
Note that a ForcedOutput Compare (FOC1B) strobe will not set the OCF1Bflag.
OCF1B is automatically clearedwhen the Output compare Match B Interruptvector is
executed.Alternatively, OCF1Bcan be clearedbywriting a logic one to itsbit location.
Bit 76543 210
TOV1 OCF1A OC1FB
–ICF1 TOV0 OCF0 TIFR
Read/Write R/W R/W R/W R/W R/W R/W R/W R/W
Initial Value00000000