beautypg.com

Table 23, Atmega8515(l) – Rainbow Electronics ATmega8515L User Manual

Page 52

background image

52

ATmega8515(L)

2512A–AVR–04/02

Note:

1. The Boot Reset Address is shown in Table 78 on page 173. For the BOOTRST Fuse

“1” means unprogrammed while “0” means programmed.

The most typical and general program setup for the Reset and Interrupt Vector
Addresses in ATmega8515 is:

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 Compare A Handler

$005

rjmp

TIM1_COMPB

; Timer1 Compare B 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

USART_RXC

; USART RX Complete Handler

$00a

rjmp

USART_UDRE

; UDR0 Empty Handler

$00b

rjmp

USART_TXC

; USART TX Complete Handler

$00c

rjmp

ANA_COMP

; Analog Comparator Handler

$00d

rjmp

EXT_INT2

; IRQ2 Handler

$00e

rjmp

TIM0_COMP

; Timer0 Compare Handler

$00f

rjmp

EE_RDY

; EEPROM Ready Handler

$010

rjmp

SPM_RDY

; Store Program Memory Ready Handler

$011

RESET:

ldi

r16,high(RAMEND); Main program start

$012

out

SPH,r16

; Set stack pointer to top of RAM

$013

ldi

r16,low(RAMEND)

$014

out

SPL,r16

$015

sei

; Enable interrupts

$016

xxx

...

...

...

Table 23. Reset and Interrupt Vectors Placement

(1)

BOOTRST

IVSEL

Reset Address

Interrupt Vectors Start Address

1

0

$0000

$0001

1

1

$0000

Boot Reset Address + $0001

0

0

Boot Reset Address

$0001

0

1

Boot Reset Address

Boot Reset Address + $0001