ATMEGA169 ATMEL [ATMEL Corporation], ATMEGA169 Datasheet - Page 49

no-image

ATMEGA169

Manufacturer Part Number
ATMEGA169
Description
8-bit Microcontroller with 16K Bytes In-System Programmable Flash
Manufacturer
ATMEL [ATMEL Corporation]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
ATMEGA169-16AI
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATMEGA169-16AI SL709
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATMEGA169-16AI SL710
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATMEGA169-16AU
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATMEGA169A-AU
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATMEGA169P-15AT
Manufacturer:
PANASONIC
Quantity:
301
Part Number:
ATMEGA169P-15AT
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
ATMEGA169P-16AU
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
ATMEGA169PA-MU
Manufacturer:
ATMEL
Quantity:
31
Part Number:
ATMEGA169PAAU
Manufacturer:
INF
Quantity:
4 275
Moving Interrupts Between
Application and Boot Space
MCU Control Register –
MCUCR
2514P–AVR–07/06
When the BOOTRST Fuse is programmed, the Boot section size set to 2K 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 General Interrupt Control Register controls the placement of the Interrupt Vector
table.
• Bit 1 – IVSEL: Interrupt Vector Select
When the IVSEL bit is cleared (zero), the Interrupt Vectors are placed at the start of the
Flash memory. When this bit is set (one), the Interrupt Vectors are moved to the begin-
ning of the Boot Loader section of the Flash. The actual address of the start of the Boot
Flash Section is determined by the BOOTSZ Fuses. Refer to the section “Boot Loader
Support – Read-While-Write Self-Programming” on page 252 for details. To avoid unin-
tentional changes of Interrupt Vector tables, a special write procedure must be followed
to change the IVSEL bit:
Interrupts will automatically be disabled while this sequence is executed. Interrupts are
disabled in the cycle IVCE is set, and they remain disabled until after the instruction fol-
lowing the write to IVSEL. If IVSEL is not written, interrupts remain disabled for four
cycles. The I-bit in the Status Register is unaffected by the automatic disabling.
Note:
Bit
Read/Write
Initial Value
Address
;
.org 0x1C00
0x1C00
0x1C02
0x1C04
...
0x1C2C
;
0x1C2E
0x1C2F
0x1C30
0x1C31
0x1C32
0x1C33
1. Write the Interrupt Vector Change Enable (IVCE) bit to one.
2. Within four cycles, write the desired value to IVSEL while writing a zero to
IVCE.
If Interrupt Vectors are placed in the Boot Loader section and Boot Lock bit BLB02 is pro-
grammed, interrupts are disabled while executing from the Application section. If
Interrupt Vectors are placed in the Application section and Boot Lock bit BLB12 is pro-
gramed, interrupts are disabled while executing from the Boot Loader section. Refer to
the section “Boot Loader Support – Read-While-Write Self-Programming” on page 252
for details on Boot Lock bits.
Labels Code
RESET: ldi
R/W
JTD
7
0
jmp
jmp
jmp
...
jmp
out
ldi
out
sei
<instr>
R
6
0
RESET
EXT_INT0
PCINT0
...
SPM_RDY
r16,high(RAMEND) ; Main program start
SPH,r16
r16,low(RAMEND)
SPL,r16
xxx
R
5
0
PUD
R/W
4
0
Comments
; Reset handler
; IRQ0 Handler
; PCINT0 Handler
;
; Store Program Memory Ready Handler
; Set Stack Pointer to top of RAM
; Enable interrupts
R
3
0
R
2
0
ATmega169/V
IVSEL
R/W
1
0
IVCE
R/W
0
0
MCUCR
49

Related parts for ATMEGA169