Datasheet

46
2586D–AVR–02/06
ATtiny25/45/85
10. Interrupts
This section describes the specifics of the interrupt handling as performed in ATtiny25/45/85.
For a general explanation of the AVR interrupt handling, refer to Reset and Interrupt Handling”
on page 11.
10.1 Interrupt Vectors in ATtiny25/45/85
If the program never enables an interrupt source, the Interrupt Vectors are not used, and regular
program code can be placed at these locations. The most typical and general program setup for
the Reset and Interrupt Vector Addresses in ATtiny25/45/85 is:
Address Labels Code Comments
0x0000 rjmp RESET ; Reset Handler
0x0001 rjmp EXT_INT0 ; IRQ0 Handler
0x0002 rjmp PCINT0 ; PCINT0 Handler
0x0003 rjmp TIM1_COMPA ; Timer1 CompareA Handler
0x0004 rjmp TIM1_OVF ; Timer1 Overflow Handler
0x0005 rjmp TIM0_OVF ; Timer0 Overflow Handler
0x0006 rjmp EE_RDY ; EEPROM Ready Handler
0x0007 rjmp ANA_COMP ; Analog Comparator Handler
0x0008 rjmp ADC ; ADC Conversion Handler
0x0009 rjmp TIM1_COMPB ; Timer1 CompareB Handler
0x000A rjmp TIM0_COMPA ;
0x000B rjmp TIM0_COMPB ;
Table 10-1. Reset and Interrupt Vectors
Vector
No.
Program
Address Source Interrupt Definition
1 0x0000 RESET
External Pin, Power-on Reset, Brown-out Reset,
Watchdog Reset
2 0x0001 INT0 External Interrupt Request 0
3 0x0002 PCINT0 Pin Change Interrupt Request 0
4 0x0003 TIMER1_COMPA Timer/Counter1 Compare Match A
5 0x0004 TIMER1_OVF Timer/Counter1 Overflow
6 0x0005 TIMER0_OVF Timer/Counter0 Overflow
7 0x0006 EE_RDY EEPROM Ready
8 0x0007 ANA_COMP Analog Comparator
9 0x0008 ADC ADC Conversion Complete
10 0x0009 TIMER1_COMPB Timer/Counter1 Compare Match B
11 0x000A TIMER0_COMPA Timer/Counter0 Compare Match A
12 0x000B TIMER0_COMPB Timer/Counter0 Compare Match B
13 0x000C WDT Watchdog Time-out
14 0x000D USI_START USI START
15 0x000E USI_OVF USI Overflow