Rainbow-electronics ATmega128RFA1 Bedienungsanleitung Seite 216

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 524
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 215
216
8266A-MCU Wireless-12/09
ATmega128RFA1
0xF073 out SPH,r16 ;Set Stack Pointer to top of RAM
0xF074 ldi r16,low(RAMEND)
0xF075 out SPL,r16
0xF076 sei ;Enable interrupts
0xFO77 <instr> xxx
15.3 Moving Interrupts Between Application and Boot Section
The MCU Control Register controls the placement of the Interrupt Vector table, see
Code Example below. For more details, see
"Reset and Interrupt Handling" on page 15.
Assembly Code Example
Move_interrupts:
; Get MCUCR
in r16, MCUCR
mov r17, r16
; Enable change of Interrupt Vectors
ori r16, (1<<IVCE)
out MCUCR, r16
; Move interrupts to Boot Flash section
ori r16, (1<<IVSEL)
out MCUCR, r17
ret
C Code Example
void Move_interrupts(void)
{
uchar temp;
/* Get MCUCR */
temp = MCUCR;
/* Enable change of Interrupt Vectors */
MCUCR = temp|(1<<IVCE);
/* Move interrupts to Boot Flash section */
MCUCR = temp|(1<<IVSEL);
}
15.4 Register Description
15.4.1 MCUCR – MCU Control Register
Bit 7 6 5 4 3 2 1 0
$35 ($55) JTD Res1 Res0 PUD Res1 Res0 IVSEL IVCE MCUCR
Read/Write RW R R RW R R RW RW
Initial Value 0 0 0 0 0 0 0 0
The MCU Control Register contains control bits for general Microcontroller Unit
functions.
Bit 7 – JTD - JTAG Interface Disable
Seitenansicht 215
1 2 ... 211 212 213 214 215 216 217 218 219 220 221 ... 523 524

Kommentare zu diesen Handbüchern

Keine Kommentare