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

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
Addressing the Flash
During Self-
Programming
Self-Programming the
Flash
328
ATmega640/1280/1281/2560/2561
The Z-pointer is used to address the SPM commands. The Z pointer consists of the Z-
registers ZL and ZH in the register file, and RAMPZ in the I/O space. The number of bits
actually used is implementation dependent. Note that the RAMPZ register is only imple-
mented when the program space is larger than 64K bytes.
Since the Flash is organized in pages (see Table 155 on page 345), the Program
Counter can be treated as having two different sections. One section, consisting of the
least significant bits, is addressing the words within a page, while the most significant
bits are addressing the pages. This is shown in Figure 137. Note that the Page Erase
and Page Write operations are addressed independently. Therefore it is of major impor-
tance that the Boot Loader software addresses the same page in both the Page Erase
and Page Write operation. Once a programming operation is initiated, the address is
latched and the Z-pointer can be used for other operations.
The (E)LPM instruction use the Z-pointer to store the address. Since this instruction
addresses the Flash byte-by-byte, also bit Z0 of the Z-pointer is used.
Figure 137. Addressing the Flash During SPM
Note:
The program memory is updated in a page by page fashion. Before programming a
page with the data stored in the temporary page buffer, the page must be erased. The
temporary page buffer is filled one word at a time using SPM and the buffer can be filled
either before the Page Erase command or between a Page Erase and a Page Write
operation:
Bit
RAMPZ
ZH (R31)
ZL (R30)
Z - REGISTER
PROGRAM MEMORY
1. The different variables used in Figure 137 are listed in Table 142 on page 335.
BIT
PAGE
RAMPZ7
PROGRAM
COUNTER
15
Z15
Z7
23
15
7
PAGE ADDRESS
WITHIN THE FLASH
ZPCMSB
PCMSB
RAMPZ6
Z14
22
14
Z6
6
PCPAGE
RAMPZ5
Z13
21
13
Z5
5
ZPAGEMSB
PAGEMSB
PCWORD
RAMPZ4
Z12
Z4
20
12
4
WORD ADDRESS
WITHIN A PAGE
(1)
1
0
0
RAMPZ3
INSTRUCTION WORD
Z11
19
11
Z3
3
PAGE
RAMPZ2
Z10
Z2
18
10
2
RAMPZ1
PCWORD[PAGEMSB:0]:
17
Z9
Z1
00
01
02
PAGEEND
9
1
2549K–AVR–01/07
RAMPZ0
16
Z8
Z0
8
0

Related parts for ATMEGA2561V