Datasheet
35
2490R–AVR–02/2013
ATmega64(L)
Using all Locations of
External Memory
Smaller than 64
Kbytes
Since the external memory is mapped after the internal memory as shown in Figure 11, the
external memory is not addressed when addressing the first 4,352 bytes of data space. It may
appear that the first 4,352 bytes of the external memory are inaccessible (external memory
addresses 0x0000 to 0x10FF). However, when connecting an external memory smaller than 64
Kbytes, for example 32 Kbytes, these locations are easily accessed simply by addressing from
address 0x8000 to 0x90FF. Since the External Memory Address bit A15 is not connected to the
external memory, addresses 0x8000 to 0x90FF will appear as addresses 0x0000 to 0x10FF for
the external memory. Addressing above address 0x90FF is not recommended, since this will
address an external memory location that is already accessed by another (lower) address. To
the Application software, the external 32 Kbytes memory will appear as one linear 32 Kbytes
address space from 0x1100 to 0x90FF. This is illustrated in Figure 17. Memory configuration B
refers to the ATmega103 compatibility mode, configuration A to the non-compatible mode.
When the device is set in ATmega103 compatibility mode, the internal address space is 4,096
bytes. This implies that the first 4,096 bytes of the external memory can be accessed at
addresses 0x8000 to 0x8FFF. To the Application software, the external 32 Kbytes memory will
appear as one linear 32 Kbytes address space from 0x1000 to 0x8FFF.
Figure 17. Address Map with 32 Kbytes External Memory
0x0000
0x10FF
0xFFFF
0x1100
0x7FFF
0x8000
0x90FF
0x9100
0x0000
0x10FF
0x1100
0x7FFF
Memory Configuration A
Memory Configuration B
Internal Memory
(Unused)
AVR Memory Map
External 32K SRAM
External
Memory
0x0000
0x0FFF
0xFFFF
0x1000
0x7FFF
0x8000
0x8FFF
0x9000
0x0000
0x0FFF
0x1000
0x7FFF
Internal Memory
(Unused)
AVR Memory Map
External 32K SRAM
External
Memory