Interrupts, 1 interrupt vectors – Rainbow Electronics ATtiny10 User Manual
Page 35
35
8127B–AVR–08/09
ATtiny4/5/9/10
9.
Interrupts
This section describes the specifics of the interrupt handling in ATtiny4/5/9/10. For a general
explanation of the AVR interrupt handling, see
“Reset and Interrupt Handling” on page 10
9.1
Interrupt Vectors
Interrupt vectors of ATtiny4/5/9/10 are described in
Table 9-1
below.
Note:
1. The ADC is available in ATtiny5/10, only.
In case the program never enables an interrupt source, the Interrupt Vectors will not be used
and, consequently, regular program code can be placed at these locations.
The most typical and general setup for interrupt vector addresses in ATtiny4/5/9/10 is shown in
the program example below.
Address
Labels Code
Comments
0x0000
rjmp
RESET
; Reset Handler
0x0001
rjmp
INT0
; IRQ0 Handler
0x0002
rjmp
PCINT0
; PCINT0 Handler
0x0003
rjmp
TIM0_CAPT
; Timer0 Capture Handler
0x0004
rjmp
TIM0_OVF
; Timer0 Overflow Handler
0x0005
rjmp
TIM0_COMPA
; Timer0 Compare A Handler
0x0006
rjmp
TIM0_COMPB
; Timer0 Compare B Handler
0x0007
rjmp
ANA_COMP
; Analog Comparator Handler
0x0008
rjmp
WDT
; Watchdog Interrupt Handler
0x0009
rjmp
VLM
; Voltage Level Monitor Handler
0x000A
rjmp
ADC
; ADC Conversion Handler
Table 9-1.
Reset and Interrupt Vectors
Vector No.
Program Address
Label
Interrupt Source
1
0x0000
RESET
External Pin, Power-on Reset,
VLM Reset, Watchdog Reset
2
0x0001
INT0
External Interrupt Request 0
3
0x0002
PCINT0
Pin Change Interrupt Request 0
4
0x0003
TIM0_CAPT
Timer/Counter0 Input Capture
5
0x0004
TIM0_OVF
Timer/Counter0 Overflow
6
0x0005
TIM0_COMPA
Timer/Counter0 Compare Match A
7
0x0006
TIM0_COMPB
Timer/Counter0 Compare Match B
8
0x0007
ANA_COMP
Analog Comparator
9
0x0008
WDT
Watchdog Time-out
10
0x0009
VLM
V
CC
Voltage Level Monitor
11
0x000A
ADC
ADC Conversion Complete