EasyManuals Logo

Atmel ATmega128 User Manual

Atmel ATmega128
386 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #63 background imageLoading...
Page #63 background image
63
2467S–AVR–07/09
ATmega128
When the BOOTRST fuse is unprogrammed, the Boot section size set to 8K bytes and the
IVSEL bit in the MCUCR Register is set before any interrupts are enabled, the most typical and
general program setup for the Reset and Interrupt Vector Addresses is:
Address LabelsCode Comments
$0000 RESET:ldi r16,high(RAMEND); Main program start
$0001 out SPH,r16 ; Set stack pointer to top of RAM
$0002 ldi r16,low(RAMEND)
$0003 out SPL,r16
$0004 sei ; Enable interrupts
$0005 <instr> xxx
;
.org $F002
$F002 jmp EXT_INT0 ; IRQ0 Handler
$F004 jmp EXT_INT1 ; IRQ1 Handler
... ... ... ;
$F044 jmp SPM_RDY ; Store Program Memory Ready Handler
When the BOOTRST fuse is programmed and the Boot section size set to 8K bytes, the most
typical and general program setup for the Reset and Interrupt Vector Addresses is:
Address LabelsCode Comments
.org $0002
$0002 jmp EXT_INT0 ; IRQ0 Handler
$0004 jmp EXT_INT1 ; IRQ1 Handler
... ... ... ;
$0044 jmp SPM_RDY ; Store Program Memory Ready Handler
;
.org $F000
$F000 RESET: ldi r16,high(RAMEND); Main program start
$F001 out SPH,r16 ; Set stack pointer to top of RAM
$F002 ldi r16,low(RAMEND)
$F003 out SPL,r16
$F004 sei ; Enable interrupts
$F005 <instr> xxx
When the BOOTRST fuse is programmed, the Boot section size set to 8K bytes and the IVSEL
bit in the MCUCR Register is set before any interrupts are enabled, the most typical and general
program setup for the Reset and Interrupt Vector Addresses is:
Address Labels Code Comments
;
.org $F000
$F000 jmp RESET ; Reset handler
$F002 jmp EXT_INT0 ; IRQ0 Handler
$F004 jmp EXT_INT1 ; IRQ1 Handler
... ... ... ;
$F044 jmp SPM_RDY ; Store Program Memory Ready Handler
$F046 RESET: ldi r16,high(RAMEND); Main program start
$F047 out SPH,r16 ; Set stack pointer to top of RAM
$F048 ldi r16,low(RAMEND)

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Atmel ATmega128 and is the answer not in the manual?

Atmel ATmega128 Specifications

General IconGeneral
BrandAtmel
ModelATmega128
CategoryMicrocontrollers
LanguageEnglish

Related product manuals