P89LV51RB2_RC2_RD2_5 © NXP B.V. 2009. All rights reserved.
Product data sheet Rev. 05 — 15 December 2009 17 of 76
NXP Semiconductors
P89LV51RB2/RC2/RD2
8-bit microcontrollers with 80C51 core
Since the upper 128 B occupy the same addresses as the SFRs, the RAM must be
accessed indirectly. The RAM and SFRs space are physically separate even though they
have the same addresses.
When instructions access addresses in the upper 128 B (above 7FH), the MCU
determines whether to access the SFRs or RAM by the type of instruction given. If it is
indirect, then RAM is accessed. If it is direct, then an SFR is accessed. See the examples
below.
Indirect access:
MOV@R0, #data; R0 contains 90H
Register R0 points to 90H which is located in the upper address range. Data in ‘#data’ is
written to RAM location 90H rather than port 1.
Direct access:
MOV90H, #data; write data to P1
Data in ‘#data’ is written to port 1. Instructions that write directly to the address, write to
the SFRs.
To access the expanded RAM, the EXTRAM bit must be cleared and MOVX instructions
must be used. The extra 768 B of memory is physically located on the chip and logically
occupies the first 768 B of external memory (addresses 000H to 2FFH).
When EXTRAM = 0, the expanded RAM is indirectly addressed using the MOVX
instruction in combination with any of the registers R0, R1 of the selected bank or DPTR.
Accessing the expanded RAM does not affect ports P0, P3.6 (WR), P3.7 (RD), or P2.
With EXTRAM = 0, the expanded RAM can be accessed as in the following example.
Expanded RAM access (indirect addressing only):
MOVX@DPTR, A DPTR contains 0A0H
Table 7. AUXR - Auxiliary register (address 8EH) bit allocation
Not bit addressable; reset value 00H.
Bit 7 6 5 4 3 2 1 0
Symbol - - - - - - EXTRAM AO
Table 8. AUXR - Auxiliary register (address 8EH) bit descriptions
Bit Symbol Description
7 to 2 - Reserved for future use. Should be set to ‘0’ by user programs.
1 EXTRAM Internal/External RAM access using MOVX
@Ri/@DPTR.
When ‘0’, core attempts to access internal XRAM with address
specified in MOVX instruction. If address supplied with this instruction
exceeds on-chip available XRAM, off-chip XRAM is going to be
selected and accessed.
When ‘1’, every MOVX
@Ri/@DPTR instruction targets external data
memory by default.
0 AO ALE off: disables/enables ALE. AO = 0 results in ALE emitted at a
constant rate of
1
⁄
2
the oscillator frequency. In case of AO = 1, ALE is
active only during a MOVX or MOVC.