ATMEGA2561V ATMEL [ATMEL Corporation], ATMEGA2561V Datasheet - Page 74

no-image

ATMEGA2561V

Manufacturer Part Number
ATMEGA2561V
Description
8-bit Microcontroller with 64K/128K/256K Bytes In-System Programmable Flash
Manufacturer
ATMEL [ATMEL Corporation]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
ATMEGA2561V-8AI
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATMEGA2561V-8AU
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATMEGA2561V-8AU
Manufacturer:
ALTERA
0
Part Number:
ATMEGA2561V-8AU
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
ATMEGA2561V-8AUR
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATMEGA2561V-8MI
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
ATMEGA2561V-8MU
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Moving Interrupts
Between Application and
Boot Section
74
ATmega640/1280/1281/2560/2561
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 typ-
ical and general program setup for the Reset and Interrupt Vector Addresses is:
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 17.
Assembly Code Example
C Code Example
Address
;
.org 0x1F000
0x1F000
0x1F002
0x1F004
...
0x1F070
;
0x1F072
0x1F073
0x1F074
0x1F075
0x1F076
0x1FO77
Move_interrupts:
void Move_interrupts(void)
{
uchar temp;
}
; Get MCUCR
in
mov
; Enable change of Interrupt Vectors
ori
out
; Move interrupts to Boot Flash section
ori
out
ret
/* Get MCUCR*/
temp = MCUCR;
/* Enable change of Interrupt Vectors */
MCUCR = temp|(1<<IVCE);
/* Move interrupts to Boot Flash section */
MCUCR = temp|(1<<IVSEL);
r16, MCUCR
r17, r16
r16, (1<<IVCE)
MCUCR, r16
r16, (1<<IVSEL)
MCUCR, r17
Labels Code
RESET: ldi
jmp
jmp
jmp
...
jmp
out
ldi
out
sei
<instr>
RESET
EXT_INT0
EXT_INT1
...
USART3_TXC
r16,high(RAMEND) ; Main program start
SPH,r16
r16,low(RAMEND)
SPL,r16
xxx
Comments
; Reset handler
; IRQ0 Handler
; IRQ1 Handler
;
; USART3 TX Complete Handler
; Set Stack Pointer to top of RAM
; Enable interrupts
2549K–AVR–01/07

Related parts for ATMEGA2561V