Datasheet
33
2549O–AVR–05/12
ATmega640/1280/1281/2560/2561
the Application software, the external 32Kbytes memory will appear as one linear 32Kbytes
address space from 0x2200 to 0xA1FF. This is illustrated in Figure 9-7.
Figure 9-7. Address Map with 32Kbytes External Memory
9.1.6 Using all 64Kbytes Locations of External Memory
Since the External Memory is mapped after the Internal Memory as shown in Figure 9-1 on page
28, only 56Kbytes of External Memory is available by default (address space 0x0000 to 0x21FF
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 setting Port C to output 0x00,
and releasing the most significant bits for normal Port Pin operation, the Memory Interface will
address 0x0000 - 0x2FFF. See the following code examples.
Care must be exercised using this option as most of the memory is masked away.
0x0000
0x21FF
0x2200
0x7FFF
0x8000
0x90FF
0x9100
0x0000
0x7FFF
Internal Memory
AVR Memory Map
External 32K SRAM
External
Memory