ARM Technical Support Knowledge Articles

USING XRAM ON THE PHILIPS 80C66X AND 80C51RX DEVICES

Applies to: C51 C Compiler

Answer


Information in this article applies to:


SYMPTOMS

Some users have reported problems using the on-chip XRAM of the Philips 80C66x and 80C51Rx devices. The memory appears to be disabled.

CAUSE

We have observed that by default, the Philips devices do not enable on-chip XRAM. This is contrary to the datasheets which, in several places, contain incorrect reset values for the AUXR register.

RESOLUTION

The on-chip XDATA RAM (XRAM) of the Philips 80C66x and 80C51Rx behaves like off-chip XDATA. So, in your program, variables that are located in XDATA will be stored in the on-chip XRAM.

There are several steps you must follow to use the on-chip XRAM.

  1. uVision2 must know to place variables in the on-chip XRAM memory. To do that, in uVision2 you must:
    • Select the correct device for your project (from the device database)
    • Enable Use on-chip ROM and Use on-chip XRAM from the Project-Options for Target-Target dialog.
  2. The on-chip XRAM must be enabled before you use it. You must do this in the startup code (so that the XRAM is on when global variables are initialized).

Add STARTUP.A51 to your project. To do this, copy the file C51LIBSTARTUP.A51 to your project folder and add it to the project. Then, in the STARTUP.A51 file, enable the on-chip XRAM by clearing bit 1 in the AUXR1 SFR. The following lines in STARTUP.A51 will do this:

RSEG ?C_C51STARTUP

AUXR1 DATA  08EH               ; add SFR definition

STARTUP1:
                               ; enable on-chip xdata RAM
          ANL AUXR1,#NOT 02H   ; AUXR1/Bit 1 (clear to 0 to enable on-chip XRAM)

Article last edited on: 2005-07-09 10:53:29

Rate this article

[Bad]
|
|
[Good]
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