8
ATtiny22/22L
SRAM Data Memory
The following figure shows how the ATtiny22/L Data Memory is organized:
Figure 7. SRAM Organization
The 224 Data Memory locations address the Register file, I/O Memory and the data SRAM. The first 96 locations address
the Register File + I/O Memory, and the next 128 locations address the 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 address space.
The Indirect with Displacement mode features 63 address locations reach from the base address given by the Y and Z
register.
When using register indirect addressing modes with automatic pre-decrement and post-increment, the address registers X,
Y and Z are used and decremented and incremented.
The 32 general purpose working registers, 64 I/O registers and the 128 bytes of data SRAM in the ATtiny22/L are all
directly accessible through all these addressing modes.
Register File
Data Address Space
R0
$00
R1
$01
R2
$02
…
…
R29
$1D
R30
$1E
R31
$1F
I/O Registers
$00
$20
$01
$21
$02
$22
…
…
$3D
$5D
$3E
$5E
$3F
$5F
Internal SRAM
$60
$61
$62
…
$DD
$DE
$DF