Datasheet

50
4337K–USB–04/08
AT89C5130A/31A-M
12. On-chip Expanded RAM (ERAM)
The AT89C5130A/31A-M provides additional Bytes of random access memory (RAM) space for
increased data parameters handling and high level language usage.
AT89C5130A/31A-M devices have expanded RAM in external data space; maximum size and
location are described in Table 12-1.
The AT89C5130A/31A-M has on-chip data memory which is mapped into the following four sep-
arate segments.
1. The Lower 128 bytes of RAM (addresses 00h to 7Fh) are directly and indirectly
addressable.
2. The Upper 128 bytes of RAM (addresses 80h to FFh) are indirectly addressable only.
3. The Special Function Registers, SFRs, (addresses 80h to FFh) are directly address-
able only.
4. The expanded RAM bytes are indirectly accessed by MOVX instructions, and with the
EXTRAM bit cleared in the AUXR register (see Table 12-1)
The lower 128 bytes can be accessed by either direct or indirect addressing. The Upper 128
bytes can be accessed by indirect addressing only. The Upper 128 bytes occupy the same
address space as the SFR. That means they have the same address, but are physically sepa-
rate from SFR space.
Figure 12-1. Internal and External Data Memory Address
When an instruction accesses an internal location above address 7Fh, the CPU knows whether
the access is to the upper 128 bytes of data RAM or to SFR space by the addressing mode used
in the instruction.
Table 12-1. Description of Expanded RAM
Part Number ERAM Size
Address
Start End
AT89C5130A/31A-M 1024 00h 3FFh
ERAM
Upper
128 bytes
Internal
RAM
Lower
128 bytes
Internal
RAM
Special
Function
Register
80h 80h
00
0FFh or 3FFh(*)
0FFh
00
0FFh
External
Data
Memory
0000
00FFh up to 03FFh (*)
0FFFFh
indirect accesses
direct accesses
direct or indirect
accesses
7Fh
(*) Depends on XRS1..0