4.4.1 Address Spaces
Most 8-bit AVR devices have a Harvard architecture, which has a separate data memory (RAM) and program memory space. On some devices, the program memory is mapped into and accessible from the data memory space. Some devices also implement EEPROM, which is memory mapped on some devices.
Both the general purpose RAM and SFRs share the same data space; however,
SFRs appear in a range of addresses (called the I/O space in the device data sheets) that
can be accessed by instructions that access the I/O space, such as the in
and out
instructions. If a device has more SFRs than these instructions
can address, the registers are located at a higher address and accessed via the
st
and ld
group of instructions.
The program memory space is primarily for executable code, but data can also be located here. There are several ways the different device families locate and read data from this memory, but all objects located here will be read-only.