ARM Technical Support Knowledge Articles


Applies to: uVision Debugger


Information in this article applies to:


I have created a project using PDATA memory. I want my PDATA to be located from 0x0000-0x00FF. But, when I run the program with the uVision simulator PDATA winds up at X:0xFF00-0xFFFF. Does the uVision2 simulator correctly simulate PDATA memory accesses?


Yes. The uVision Simulator behaves exactly as the chip.

Most 8051 devices use the value of Port 2 as the high address byte for PDATA memory access (MOVX @Rx). The 16-bit address is created using P2 and R0 or R1. After reset, the value of P2 is 0xFF. So, PDATA memory accesses are to the address range 0xFF00-0xFFFF. This is the default behavior of the uVision simulator.

In order for the uVision simulator to access PDATA memory from 0x0000-0x00FF, you must properly configure the startup code. Refer to C51: USING PDATA MEMORY for more information.

Note that uVision correctly simulates PDATA access to on-chip XDATA. When you enable on-chip XRAM on Philips or Atmel devices, the MOVX R0/R1 instructions always access the memory region X:0x0000-0x00FF regardless of the value in P2.

On classic 8051 devices, the PPAGE VTREG allows you to specify the PDATA page to use or the SFR register that contains the PDATA page. For example:

PPAGE=0xFFFFFFF  // Use default behavior for MOVX @Rx
                 // (get upper address byte from P2)

PPAGE=0x10       // MOVX @Rx addresses X:0x10??
PPAGE=0x38       // MOVX @Rx addresses X:0x38??

PPAGE=D:0x95     // Use the SFR at D:0x95 as the
                 // page register for MOVX @Rx


Article last edited on: 2006-12-21 08:15:15

Rate this article

Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential