Rainbow-electronics ATmega64L Uživatelský manuál Strana 44

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 298
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 43
44
ATmega16(L)
2466B09/01
When the BOOTRST fuse is unprogrammed, the boot section size set to 2K bytes and
the IVSEL bit in the GICR register is set before any interrupts are enabled, the most typ-
ical and general program setup for the Reset and Interrupt Vector Addresses is:
Address Labels Code Comments
$000 RESET: ldi r16,high(RAMEND) ; Main program start
$001 out SPH,r16 ; Set stack pointer to top of RAM
$002 ldi r16,low(RAMEND)
$003 out SPL,r16
$004 sei ; Enable interrupts
$005 <instr> xxx
;
.org $1C02
$1C02 jmp EXT_INT0 ; IRQ0 Handler
$1C04 jmp EXT_INT1 ; IRQ1 Handler
... .... .. ;
$1C28 jmp SPM_RDY ; Store Program Memory Ready Handler
When the BOOTRST fuse is programmed and the boot section size set to 2K bytes, the
most typical and general program setup for the Reset and Interrupt Vector Addresses is:
Address Labels Code Comments
.org $002
$002 jmp EXT_INT0 ; IRQ0 Handler
$004 jmp EXT_INT1 ; IRQ1 Handler
... .... .. ;
$028 jmp SPM_RDY ; Store Program Memory Ready Handler
;
.org $1C00
$1C00 RESET: ldi r16,high(RAMEND) ; Main program start
$1C01 out SPH,r16 ; Set stack pointer to top of RAM
$1C02 ldi r16,low(RAMEND)
$1C03 out SPL,r16
$1C04 sei ; Enable interrupts
$1C05 <instr> xxx
When the BOOTRST fuse is programmed, the boot section size set to 2K bytes and the
IVSEL bit in the GICR 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 $1C00
$1C00 jmp RESET ; Reset handler
$1C02 jmp EXT_INT0 ; IRQ0 Handler
$1C04 jmp EXT_INT1 ; IRQ1 Handler
... .... .. ;
$1C28 jmp SPM_RDY ; Store Program Memory Ready Handler
;
$1C2A RESET: ldi r16,high(RAMEND) ; Main program start
$1C2B out SPH,r16 ; Set stack pointer to top of RAM
$1C2C ldi r16,low(RAMEND)
$1C2D out SPL,r16
$1C2E sei ; Enable interrupts
$1C2F <instr> xxx
Zobrazit stránku 43
1 2 ... 39 40 41 42 43 44 45 46 47 48 49 ... 297 298

Komentáře k této Příručce

Žádné komentáře