18
8008H–AVR–04/11
ATtiny48/88
5.2
Data Memory (SRAM) and Register Files
Table 5-2 shows how the data memory and register files of ATtiny48/88 are organized. These
memory areas are volatile, i.e. they do not retain information when power is removed.
Note:
1. Also known as data address. This mode of addressing covers the entire data memory and reg-
ister area. The address is contained in a 16-bit area of two-word instructions.
2. Also known as direct I/O address. This mode of addressing covers part of the register area,
only. It is used by instructions where the address is embedded in the instruction word.
The 512/768 memory locations include the general purpose register file, I/O register file,
extended I/O register file, and the internal data memory.
For compatibility with future devices, reserved bits should be written to zero, if accessed.
Reserved I/O memory addresses should never be written.
5.2.1
General Purpose Register File
The first 32 locations are reserved for the general purpose register file. These registers are
5.2.2
I/O Register File
Following the general purpose register file, the next 64 locations are reserved for I/O registers.
Registers in this area are used mainly for communicating with I/O and peripheral units of the
device. Data can be transferred between I/O space and the general purpose register file using
instructions such as IN, OUT, LD, ST, and derivatives.
All I/O registers in this area can be accessed with the instructions IN and OUT. These I/O spe-
cific instructions address the first location in the I/O register area as 0x00 and the last as 0x3F.
The low 32 registers (address range 0x00...0x1F) are accessible by some bit-specific instruc-
tions. In these registers, bits are easily set and cleared using SBI and CBI, while bit-conditional
branches are readily constructed using instructions SBIC, SBIS, SBRC, and SBRS.
Registers in this area may also be accessed with instructions LD/LDD/LDI/LDS and
ST/STD/STS. These instructions treat the entire volatile memory as one data space and, there-
fore, address I/O registers starting at 0x20.
Table 5-2.
Layout of Data Memory and Register Area.
Device
Memory Area
Size
ATtiny48
General purpose register file
32B
0x0000 – 0x001F
n/a
I/O register file
64B
0x0020 – 0x005F
0x00 – 0x3F
Extended I/O register file
160B
0x0060 – 0x00FF
n/a
Data SRAM
256B
0x0100 – 0x01FF
n/a
ATtiny88
General purpose register file
32B
0x0000 – 0x001F
n/a
I/O register file
64B
0x0020 – 0x005F
0x00 – 0x3F
Extended I/O register file
160B
0x0060 – 0x00FF
n/a
Data SRAM
512B
0x0100 – 0x02FF
n/a