cytat z dokumentacji atmega162:
atmega162.pdf napisał:
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 1,280 bytes of data
space. It may appear that the first 1,280 bytes of the external memory are inaccessible
(external memory addresses 0x0000 to 0x04FF). However, when connecting an external
memory smaller than 64 KB, for example 32 KB, these locations are easily accessed
simply by addressing from address 0x8000 to 0x84FF. Since the External Memory
Address bit A15 is not connected to the external memory, addresses 0x8000 to 0x84FF
will appear as addresses 0x0000 to 0x04FF for the external memory. Addressing above
address 0x84FF 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 KB memory will appear as one linear 32 KB address space from 0x0500
to 0x84FF. This is illustrated in Figure 17. Memory configuration B refers to the
ATmega161 compatibility mode, configuration A to the non-compatible mode.
co oznacza że przy zapisie pod adres 0x0500 na linie adresowe będzie wystawiony adres 0x0500..
opisany przykład z dostępem do całego ramu 32KB polega na tym, że przy zapisie pod adres np 0x8123 najstarszy bit będzie tracony co daje adres 0x0123 ale w zewnętrznym ram, a nie w wewnętrznym.. w ten sposób można sie dostać do zamapowanych (przez rejestry i IO) dolnych 1280 bajtów zewnętrznego ramu.. przy pamięci 64KB ta sztuczka niezadziała i najzwyczajniej 1280 bajtów ramu jest tracone..