P89CV51RB2_RC2_RD2_3 © NXP B.V. 2009. All rights reserved.
Product data sheet Rev. 03 — 25 August 2009 13 of 76
NXP Semiconductors
P89CV51RB2/RC2/RD2
80C51 with 1 kB RAM, SPI
6.2 Memory organization
The various P89CV51RB2/RC2/RD2 memory spaces are as follows:
DATA
128 B of internal data memory space (00H:7FH) accessed via direct or indirect
addressing, using instructions other than MOVX and MOVC. All or part of the stack
may be in this area.
IDATA
Indirect Data. 256 B of internal data memory space (00H:FFH) accessed via indirect
addressing using instructions other than MOVX and MOVC. All or part of the stack
may be in this area. This area includes the DATA area and the 128 B immediately
above it.
SFR
Special Function Registers. Selected CPU registers and peripheral control and status
registers, accessible only via direct addressing.
XDATA
‘External’ Data or auxiliary RAM. Duplicates the classic 80C51 64 kB memory space
addressed via the MOVX instruction using the DPTR, R0, or R1. The
P89CV51RB2/RC2/RD2 have 768 B of on-chip XDATA memory.
CODE
64 kB of code memory space, accessed as part of program execution and via the
MOVC instruction. The P89CV51RB2/RC2/RD2 have 16/32/64 kB of on-chip code
memory.
6.2.1 Expanded data RAM addressing
The P89CV51RB2/RC2/RD2 have 1 kB of data RAM; see Figure 4.
To access the expanded RAM (XRAM), the EXTRAM bit must be set and MOVX
instructions must be used. The expanded memory is physically located on the chip and
logically occupies the first bytes 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 5. AUXR - Auxiliary function register (address 8EH) bit allocation
Not bit addressable; reset value 00H.
Bit 7 6 5 4 3 2 1 0
Symbol - - - - - - EXTRAM AO
P89CV51RB2_RC2_RD2_3 © NXP B.V. 2009. All rights reserved.
Product data sheet Rev. 03 — 25 August 2009 14 of 76
NXP Semiconductors
P89CV51RB2/RC2/RD2
80C51 with 1 kB RAM, SPI
The DPTR points to location 0A0H and the data in the accumulator is written to address
0A0H of the expanded RAM rather than off-chip external memory. Access to EXTRAM
addresses that are not present on the device (above 2FFH) will access external off-chip
memory and will perform in the same way as the standard 8051, with P0 and P2 as
data/address bus, and P3[6] and P3[7] as write and read timing signals.
When EXTRAM = 1, MOVX @Ri and MOVX @DPTR will be similar to the standard 8051.
Using MOVX @Ri provides an 8-bit address with multiplexed data on Port 0. Other output
port pins can be used to output higher order address bits. This provides external paging
capabilities. Using MOVX @DPTR generates a 16-bit address. This allows external
addressing up to 64 kB. Port 2 provides the high-order eight address bits (DPH), and
Port 0 multiplexes the low-order eight address bits (DPL) with data. Both MOVX @Ri and
MOVX @DPTR generates the necessary read and write signals (P3[6] - WR and P3[7] -
RD) for external memory use. Table 7 shows external data memory RD, WR operation
with EXTRAM bit.
The stack pointer (SP) can be located anywhere within the 256 B of internal RAM (lower
128 B and upper 128 B). The stack pointer may not be located in any part of the expanded
RAM.
Table 6. AUXR - Auxiliary function register (address 8EH) bit description
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,
accesses internal XRAM with address specified in MOVX instruction.
If address supplied with this instruction exceeds on-chip available
XRAM, off-chip RAM is accessed. When 1, every MOVX 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.
Table 7. External data memory RD, WR with EXTRAM bit
AUXR MOVX @DPTR, A or MOVX A, @DPTR MOVX @Ri, A or MOVX A, @Ri
ADDR < 0300H ADDR 0300H ADDR = any
EXTRAM = 1
RD/WR asserted RD/WR asserted RD/WR asserted
EXTRAM = 0
RD/WR not asserted RD/WR asserted RD/WR not asserted
P89CV51RB2_RC2_RD2_3 © NXP B.V. 2009. All rights reserved.
Product data sheet Rev. 03 — 25 August 2009 15 of 76
NXP Semiconductors
P89CV51RB2/RC2/RD2
80C51 with 1 kB RAM, SPI
6.2.2 Dual data pointers
The device has two 16-bit data pointers. The DPTR Select (DPS) bit in AUXR1
determines which of the two data pointers is accessed. When DPS = 0, DPTR0 is
selected; when DPS = 1, DPTR1 is selected. Quickly switching between the two data
pointers can be accomplished by a single INC instruction on AUXR1; see Figure 5.
Fig 4. Internal and external data memory structure
000H
2FFH
00H
FFH
UPPER 128 B
INTERNAL RAM
LOWER 128 B
INTERNAL RAM
(INDIRECT AND
DIRECT
ADDRESSING)
(INDIRECT
ADDRESSING)
(DIRECT
ADDRESSING)
SPECIAL
FUNCTION
REGISTERS (SFRs)
80H
FFH
FFFFH
000H
EXTERNAL
DATA
MEMORY
EXTERNAL
DATA
MEMORY
2FFH
0000H
EXTRAM = 0 EXTRAM = 1
EXPANDED RAM
0300H
(INDIRECT
ADDRESSING)
(INDIRECT
ADDRESSING)
(INDIRECT
ADDRESSING)
FFFFH
80H
7FH
002aaa517
EXPANDED
RAM
768 B

P89CV51RD2FA,512

Mfr. #:
Manufacturer:
NXP Semiconductors
Description:
IC MCU 8BIT 64KB FLASH 44PLCC
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union