4.9.3.2 SRAM Data Memory
The AVR is a complex microcontroller with more peripheral units than can be supported within the 64 locations reserved in the op-code for the IN and OUT instructions. For the extended I/O space from 0x0060 - 0x01FF and the SRAM from 0x0200 – 0x05FF, only the ST/STS/STD and LD/LDS/LDD instructions can be used.
The lower data memory locations address 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 locations the standard I/O memory, then 416 locations of extended I/O memory followed by 1024 locations which address the internal data SRAM as shown in the following figure.
The five different addressing modes for the data memory cover: direct, indirect with displacement, indirect, indirect with predecrement and indirect with post-increment. In the register file, registers R26 to R31 are 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 predecrement and post-increment, the X, Y and Z address registers are decremented or incremented.
The 32 general purpose working registers, 64 I/O registers, 416 extended I/O registers and the 1024 bytes of internal data SRAM in the ATA8210/15 are completely accessible through all these addressing modes. For more details on the register file, see General Purpose Register File from Related Links.