ATmega64(L)
Using all Locations of
External Memory Smaller than
64 KB
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 exter-
nal memory smaller than 64 KB, for example 32 KB, 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 loca-
tion that is already accessed by another (lower) address. To the Application software,
the external 32 KB memory will appear as one linear 32 KB 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
KB memory will appear as one linear 32 KB address space from 0x1000 to 0x8FFF.
Figure 17. Address Map with 32 KB External Memory
Memory Configuration A
Memory Configuration B
AVR Memory Map
0x0000
Internal Memory
0x10FF
0x1100
External 32K SRAM
0x0000
0x10FF
0x1100
AVR Memory Map
0x0000
0x0FFF Internal Memory
0x1000
External 32K SRAM
0x0000
0x0FFF
0x1000
0x7FFF
0x8000
External
Memory
0x90FF
0x9100
(Unused)
0xFFFF
0x7FFF
0x7FFF
0x8000
External
Memory
0x8FFF
0x9000
(Unused)
0xFFFF
0x7FFF
33
2490G–AVR–03/04