
24
ATmega64A [DATASHEET]
8160D–AVR–02/2013
Figure 8-9.
External Data Memory Cycles with SRWn1 = 1 and SRWn0 = 1
Note:
1. SRWn1 = SRW11 (upper sector) or SRW01 (lower sector), SRWn0 = SRW10 (upper sector) or SRW00 (lower sec-
tor).
The ALE pulse in period T7 is only present if the next instruction accesses the RAM (internal or external).
8.5.7
Using all Locations of External Memory Smaller than 64 Kbyte
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 Kbyte, for example 32 Kbyte, these locations are easily accessed
simply by addressing from address 0x8000 to 0x90FF. Since the External Memory Address bit A15 is not con-
nected 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
Kbyte memory will appear as one linear 32 Kbyte address space from 0x1100 to 0x90FF. This is illustrated in
Fig-ure 8-10. 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 Applica-
tion software, the external 32 Kbyte memory will appear as one linear 32 Kbyte address space from 0x1000 to
0x8FFF.
ALE
T1
T2
T3
Wr
ite
Read
WR
T7
A15:8
Address
Prev. Addr.
DA7:0
Address
Data
Prev. Data
XX
RD
DA7:0 (XMBK = 0)
Data
Prev. Data
Address
Data
Prev. Data
Address
DA7:0 (XMBK = 1)
System Clock (CLKCPU)
T4
T5
T6