English
Language : 

MEGA128CAN Datasheet, PDF (31/413 Pages) ATMEL Corporation – Microcontroller WITH 128K BYTES OF ISP FLASH AND CAN CONTROLLER
AT90CAN128
Using all Locations of
External Memory Smaller than
64 KB
Since the external memory is mapped after the internal memory as shown in Figure 12,
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 18.
Figure 18. Address Map with 32 KB External Memory
AVR Memory Map
External 32K SRAM
0x0000
0x10FF
0x1100
Internal Memory
0x0000
0x10FF
0x1100
External Memory
0x7FFF
0x8000
0x90FF
0x9100
0x7FFF
(Unused)
Using all 64KB Locations of
External Memory
0xFFFF
Since the External Memory is mapped after the Internal Memory as shown in Figure 12,
only 60KB of External Memory is available by default (address space 0x0000 to 0x10FF
is reserved for internal memory). However, it is possible to take advantage of the entire
External Memory by masking the higher address bits to zero. This can be done by using
the XMMn bits and control by software the most significant bits of the address. By set-
ting Port C to output 0x00, and releasing the most significant bits for normal Port Pin
operation, the Memory Interface will address 0x0000 - 0x1FFF. See the following code
examples.
31
4250E–CAN–12/04