atmega323l ATMEL Corporation, atmega323l Datasheet - Page 210

no-image

atmega323l

Manufacturer Part Number
atmega323l
Description
Atmega323 8-bit Avr Microcontroller With 32k Bytes Of In-system Programmable Flash
Manufacturer
ATMEL Corporation
Datasheet
Performing Chip Erase
Programming the Flash
Reading the Flash
210
ATmega323(L)
1. Enter JTAG instruction PROG_COMMANDS.
2. Start chip erase using programming instruction 1a.
3. Poll for chip erase complete using programming instruction 1b, or wait for
1. Enter JTAG instruction PROG_COMMANDS.
2. Enable Flash write using programming instruction 2a.
3. Load address using programming instructions 2b and 2c.
4. Load data using programming instructions 2d, 2e and 2f.
5. Repeat step 3 and 4 for all 64 instruction words in the page.
6. Write the page using programming instruction 2g.
7. Poll for Flash write complete using programming instruction 2h, or wait for
8. Repeat steps 3 to 7 until all data have been programmed.
A more efficient data transfer can be achieved using the PROG_PAGELOAD
instruction:
1. Enter JTAG instruction PROG_COMMANDS.
2. Enable Flash write using programming instruction 2a.
3. Load the page address using programming instructions 2b and 2c. The 6 LSB
4. Enter JTAG instruction PROG_PAGELOAD.
5. Load the entire page by shifting in all instruction words in the page, starting with
6. Enter JTAG instruction PROG_COMMANDS.
7. Write the page using programming instruction 2g.
8. Poll for Flash write complete using programming instruction 2h, or wait for
9. Repeat steps 3 to 8 until all data have been programmed.
1. Enter JTAG instruction PROG_COMMANDS.
2. Enable Flash read using programming instruction 3a.
3. Load address using programming instructions 3b and 3c.
4. Read data using programming instruction 3d.
5. Repeat steps 3 and 4 until all data have been read.
A more efficient data transfer can be achieved using the PROG_PAGEREAD
instruction:
1. Enter JTAG instruction PROG_COMMANDS.
2. Enable Flash read using programming instruction 3a.
3. Load the page address using programming instructions 3b and 3c. The 6 LSB
4. Enter JTAG instruction PROG_PAGEREAD.
5. Read the entire page by shifting out all instruction words in the page, starting
t
t
are used to address within one page and must be written as 0.
the LSB of the first instruction in the page and ending with the MSB of the last
instruction in the page.
t
are used to address within one page and must be written as 0.
with the LSB of the instruction with page address 0 and ending with the MSB of
the instruction with page address 3F. Remember that the first eight bits should be
ignored.
WLRH_CE
WLRH_FLASH
WLRH_FLASH
(refer to Table 67 on page 196).
(refer to Table 67 on page 196).
(refer to Table 67 on page 196).
1457G–AVR–09/03

Related parts for atmega323l