Rainbow-electronics ATmega128L Manuel d'utilisateur Page 57

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 331
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 56
57
ATmega128(L)
2467B09/01
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 Labels Code 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 Labels Code 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 typi-
cal 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)
$F049 out SPL,r16
$F04A sei ; Enable interrupts
$F04B <instr> xxx
Vue de la page 56
1 2 ... 52 53 54 55 56 57 58 59 60 61 62 ... 330 331

Commentaires sur ces manuels

Pas de commentaire