Datasheet

ATmega48PA/88PA/168PA [DATASHEET]
9223F–AVR–04/14
16
8. AVR Memories
8.1 Overview
This section describes the different memories in the Atmel
®
ATmega48PA/88PA/168PA. The AVR
®
architecture has two
main memory spaces, the data memory and the program memory space. In addition, the Atmel ATmega48PA/88PA/168PA
features an EEPROM memory for data storage. All three memory spaces are linear and regular.
8.2 In-System Reprogrammable Flash Program Memory
The Atmel ATmega48PA/88PA/168PA contains 4/8/16K 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 2/4/8/16K x 16. For software security, the
flash program memory space is divided into two sections, boot loader section and application program Ssction in the Atmel
ATmega88PA and the Atmel ATmega168PA. See SELFPRGEN description in Section 27.9.1 “SPMCSR – Store Program
Memory Control and Status Register” on page 249 for more details.
The flash memory has an endurance of at least 10,000 write/erase cycles. The Atmel ATmega48PA/88PA/168PA program
counter (PC) is 11/12/13/14 bits wide, thus addressing the 2/4/8/16K program memory locations. The operation of boot
program section and associated boot lock bits for software protection are described in detail in Section 26. “Self-
Programming the Flash, Atmel ATmega48PA” on page 231 and Section 27. “Boot Loader Support – Read-While-Write Self-
Programming” on page 237. Section 28. “Memory Programming” on page 251 contains a detailed description on flash
programming in SPI- or parallel programming 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 Section 7.6 “Instruction Execution Timing” on page 13.
Figure 8-1. Program Memory Map Atmel ATmega48PA
0x0000
0x7FF
Program Memory
Application Flash Section