Datasheet

15
ATmega48/88/168 Automotive [DATASHEET]
7530K–AVR–07/14
5. AVR ATmega48/88/168 Memories
This section describes the different memories in the Atmel
®
ATmega48/88/168. The AVR
®
architecture has two main
memory spaces, the data memory and the program memory space. In addition, the Atmel ATmega48/88/168 features an
EEPROM memory for data storage. All three memory spaces are linear and regular.
5.1 In-System Reprogrammable Flash Program Memory
The Atmel ATmega48/88/168 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/8K x 16. For software security, the flash
program memory space is divided into two sections, boot loader section and application program section in Atmel
ATmega88 and ATmega168. ATmega48 does not have separate boot loader and application program sections, and the
SPM instruction can be executed from the entire flash. See SELFPRGEN description in Section 23.4.1 “Store Program
Memory Control and Status Register – SPMCSR” on page 225 and Section 24.5.1 “Store Program Memory Control and
Status Register – SPMCSR” on page 233 for more details.
The flash memory has an endurance of at least 75,000 write/erase cycles. The Atmel ATmega48/88/168 program counter
(PC) is 11/12/13 bits wide, thus addressing the 2/4/8K program memory locations. The operation of boot program section
and associated boot lock bits for software protection are described in detail in Section 23. “Self-Programming the Flash,
ATmega48” on page 223 and Section 24. “Boot Loader Support – Read-While-Write Self-Programming, ATmega88 and
ATmega168” on page 229. Section 25. “Memory Programming” on page 242 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 4.7 “Instruction Execution Timing” on page 13.
Figure 5-1. Program Memory Map, ATmega48
0x0000
0x7FFF
Program Memory
Application Flash Section