
34
7682C–AUTO–04/08
AT90CAN32/64/128
4.5.8
Using all Locations of External Memory Smaller than 64 KB
Since the external memory is mapped after the internal memory as shown in
Figure 4-4, the
external memory is not addressed when addressing the first “
ISRAM size” bytes of data space. It
may appear that the first
“ISRAM size” bytes of the external memory are inaccessible (external
memory addresses 0x0000 to “
ISRAM end”). However, when connecting an external memory
smaller than 64 KB, for example 32 KB, these locations are easily accessed simply by address-
ing from address 0x8000 to
“ISRAM end + 0x8000”. Since the External Memory Address bit A15
is not connected to the external memory, addresses 0x8000 to “
ISRAM end + 0x8000” will
appear as addresses 0x0000 to “
ISRAM end” for the external memory. Addressing above
address “
ISRAM end + 0x8000” is not recommended, since this will address an external mem-
ory location 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 “
XMem start” to
Figure 4-10. Address Map with 32 KB External Memory
Table 4-5.
Port C Pins Released as Normal Port Pins when the External Memory is Enabled
XMM2
XMM1
XMM0
# Bits for External Memory Address
Released Port Pins
0
8 (Full External Memory Space)
None
0
1
7
PC7
0
1
0
6
PC7 .. PC6
0
1
5
PC7 .. PC5
1
0
4
PC7 .. PC4
1
0
1
3
PC7 .. PC3
1
0
2
PC7 .. PC2
1
No Address high bits
Full Port C
(Unused)
Internal Memory
0x0000
XMem start
ISRAM end
0xFFFF
AVR Memory Map
External Memory
0x8000
0x7FFF
XMem start + 0x8000
ISRAM end + 0x8000
External 32K SRAM (Size=0x8
0x7FFF
0x0000
XMem start
ISRAM end