Datasheet
16
ATtiny828 [DATASHEET]
8371A–AVR–08/12
5. Memories
The AVR architecture makes a distinction between program memory and data memory, locating each memory type in a
separate address space. Executable code is located in non-volatile program memory (Flash), whereas data can be
placed in either volatile (SRAM) or non-volatile memory (EEPROM). See Figure 9, below.
Figure 9. Memory Overview.
All memory spaces are linear and regular.
5.1 Program Memory (Flash)
ATtiny828 contains 8K byte of on-chip, in-system reprogrammable Flash memory for program storage. Flash memories
are non-volatile, i.e. they retain stored information even when not powered.
Since all AVR instructions are 16 or 32 bits wide, the Flash is organized as 4096 x 16 bits. The Program Counter (PC) is
12 bits wide, thus capable of addressing all 4096 locations of program memory, as illustrated in Table 1, below.
Table 2. Size of Program Memory (Flash)
For reasons of software security, the Flash program memory has been divided into two sections; the boot loader section
and the application program section. For more information, see “Self-Programming the Flash” on page 218, and
“Application and Boot Loader Flash Sections” on page 214.
Constant tables can be allocated within the entire address space of program memory. See instructions LPM (Load
Program Memory), and SPM (Store Program Memory) in “Instruction Set Summary” on page 301. Flash program
memory can also be programmed from an external device, as described in “External Programming” on page 232.
Timing diagrams for instruction fetch and execution are presented in “Instruction Execution Timing” on page 11.
The Flash memory has a minimum endurance of 10,000 write/erase cycles.
GENERAL PURPOSE
REGISTER FILE
I/O REGISTER FILE
EXTENDED
I/O REGISTER FILE
DATA MEMORY
DATA MEMORY
PROGRAM MEMORY
FLASH SRAM EEPROM
Device Flash Size Address Range
ATtiny828 8KB 4096 words 0x0000 – 0x0FFF