Datasheet
16
7810C–AVR–10/12
Atmel ATmega328P [Preliminary]
7. AVR Memories
7.1 Overview
This section describes the different memories in the ATmega328P. The AVR architecture has
two main memory spaces, the Data Memory and the Program Memory space. In addition, the
ATmega328P features an EEPROM Memory for data storage. All three memory spaces are lin-
ear and regular.
7.2 In-System Reprogrammable Flash Program Memory
The ATmega328P contains 32K bytes On-chip In-System Reprogrammable Flash memory for
program storage. Since all AVR instructions are 16 or 32 bits wide, the Flash is organized as
16K x 16. For software security, the Flash Program memory space is divided into two sections,
Boot Loader Section and Application Program Section in ATmega328P. See SELFPRGEN
description in section “SPMCSR – Store Program Memory Control and Status Register” on page
269 and page 284for more details.
The Flash memory has an endurance of at least 10,000 write/erase cycles. The ATmega328P
Program Counter (PC) is 14 bits wide, thus addressing the 16K program memory locations. The
operation of Boot Program section and associated Boot Lock bits for software protection are
described in detail in “Self-Programming the Flash, ATmega328P” on page 263 and “Boot
Loader Support – Read-While-Write Self-Programming” on page 271. “Memory Programming”
on page 286 contains a detailed description on Flash Programming in SPI- or Parallel Program-
ming mode.
Constant tables can be allocated within the entire program memory address space (see the LPM
– Load Program Memory instruction description).
Timing diagrams for instruction fetch and execution are presented in “Instruction Execution Tim-
ing” on page 13.