Datasheet
ATmega164A/PA/324A/PA/644A/PA/1284/P
2018 Microchip Technology Inc. Data Sheet Complete DS40002070A-page 28
Figure 8-1. Program memory map
8.3 SRAM data memory
Figure 8-2 shows how the ATmega164A/164PA/324A/324PA/644A/644PA/1284/1284P SRAM Memory is
organized.
The ATmega164A/164PA/324A/324PA/644A/644PA/1284/1284P is a complex microcontroller with more
peripheral units than can be supported within the 64 location reserved in the Opcode for the IN and OUT
instructions. For the Extended I/O space from $060 - $FF in SRAM, only the ST/STS/STD and LD/LDS/LDD
instructions can be used.
The first 4,352 Data Memory locations address both the Register File, the I/O Memory, Extended I/O Memory,
and the internal data SRAM. The first 32 locations address the Register file, the next 64 location the standard
I/O Memory, then 160 locations of Extended I/O memory and the next 4,096 locations address the internal data
SRAM.
The five different addressing modes for the data memory cover: Direct, Indirect with Displacement, Indirect,
Indirect with Pre-decrement, and Indirect with Post-increment. In the Register file, registers R26 to R31 feature
the indirect addressing pointer registers.
The direct addressing reaches the entire data space.
The Indirect with Displacement mode reaches 63 address locations from the base address given by the Y- or Z-
register.
When using register indirect addressing modes with automatic pre-decrement and post-increment, the address
registers X, Y, and Z are decremented or incremented.
Application Flash Section
Boot Flash Section
Program Memory
0x0000
0x1FFF/0x3FFF/0x7FFF/0xFFFF