Specifications
22
AT90S8515
0841G–09/01
Reset and Interrupt
Handling
The AT90S8515 provides 12 different interrupt sources. These interrupts and the sepa-
rate reset vector each have a separate program vector in the program memory space.
All interrupts are assigned individual enable bits that must be set (one) together with the
I-bit in the Status Register in order to enable the interrupt.
The lowest addresses in the program memory space are automatically defined as the
Reset and Interrupt vectors. The complete list of vectors is shown in Table 2. The list
also determines the priority levels of the different interrupts. The lower the address, the
higher the priority level. RESET has the highest priority, and next is INT0 (the External
Interrupt Request 0), etc.
The most typical and general program setup for the Reset and Interrupt vector
addresses are:
Address Labels Code Comments
$000 rjmp RESET ; Reset Handler
$001 rjmp EXT_INT0 ; IRQ0 Handler
$002 rjmp EXT_INT1 ; IRQ1 Handler
$003 rjmp TIM1_CAPT ; Timer1 Capture Handler
$004 rjmp TIM1_COMPA ; Timer1 CompareA Handler
$005 rjmp TIM1_COMPB ; Timer1 CompareB Handler
$006 rjmp TIM1_OVF ; Timer1 Overflow Handler
$007 rjmp TIM0_OVF ; Timer0 Overflow Handler
$008 rjmp SPI_STC ; SPI Transfer Complete Handler
$009 rjmp UART_RXC ; UART RX Complete Handler
$00a rjmp UART_DRE ; UDR Empty Handler
$00b rjmp UART_TXC ; UART TX Complete Handler
$00c rjmp ANA_COMP ; Analog Comparator Handler
;
$00d MAIN: ldi r16,high(RAMEND); Main program start
$00e out SPH,r16
Table 2. Reset and Interrupt Vectors
Vector No.
Program
Address Source Interrupt Definition
1 $000 RESET
External Reset, Power-on Reset and
Watchdog Reset
2 $001 INT0 External Interrupt Request 0
3 $002 INT1 External Interrupt Request 1
4 $003 TIMER1 CAPT Timer/Counter1 Capture Event
5 $004 TIMER1 COMPA Timer/Counter1 Compare Match A
6 $005 TIMER1 COMPB Timer/Counter1 Compare Match B
7 $006 TIMER1 OVF Timer/Counter1 Overflow
8 $007 TIMER0, OVF Timer/Counter0 Overflow
9 $008 SPI, STC Serial Transfer Complete
10 $009 UART, RX UART, Rx Complete
11 $00A UART, UDRE UART Data Register Empty
12 $00B UART, TX UART, Tx Complete
13 $00C ANA_COMP Analog Comparator