Datasheet
173
7701F–AVR–10/12
Atmel ATtiny24/44/84 [Preliminary]
21.8.3 Chip Erase
The Chip Erase will erase the Flash and EEPROM
(1)
memories, as well as lock bits. The lock
bits are not reset until the program memory has been completely erased. The fuse bits are not
changed. A chip erase must be performed before the flash and/or EEPROM are
reprogrammed.
Note: 1. The EEPROM memory is preserved during Chip Erase if the EESAVE Fuse is programmed.
1. Load "Chip Erase" command (see Table 21-15 on page 175).
2. Wait after Instr. 3 until SDO goes high for the “Chip Erase” cycle to finish.
3. Load "No Operation" command.
21.8.4 Programming the Flash
The Flash is organized in pages, see “Page Size” on page 166. When programming the flash,
the program data are latched into a page buffer. This allows one page of program data to be
programmed simultaneously. The following procedure describes how to program the entire
flash memory:
1. Load "Write Flash" command (see Table 21-15 on page 175).
2. Load Flash Page Buffer.
3. Load Flash High Address and Program Page. Wait after Instr. 3 until SDO goes high for
the “Page Programming” cycle to finish.
4. Repeat 2 and 3 until the entire flash is programmed, or until all data has been
programmed.
5. End page programming by loading "No Operation" command.
When writing or reading serial data to the Atmel
®
ATtiny24/44/84, data are clocked on the ris-
ing edge of the serial clock. See Figure 22-5 on page 186, Figure 21-3 on page 171 and Table
22-9 on page 186 for details.
Figure 21-4. Addressing the Flash which is Organized in Pages
PROGRAM MEMORY
WORD ADDRESS
WITHIN A PAGE
PAGE ADDRESS
WITHIN THE FLASH
INSTRUCTION WORD
PAGE
PCWORD[PAGEMSB:0]:
00
01
02
PAGEEND
PAGE
PCWORDPCPAGE
PCMSB
PAGEMSB
PROGRAM
COUNTER