Keil Logo

C51: RAMSIZE FOR THE PHILIPS 87C528


Information in this article applies to:

  • C51 Version 5.50
  • C51 Version 6.00

QUESTION

I want to use Philips 87C528 microcontrollers which have 512 Bytes of Internal RAM inside. However, the linker only lets me specify an internal RAMSIZE of 256 bytes. Is there any way to change this limit?

ANSWER

The 8xC528 and numerous other Philips derivatives provide more than 256 bytes of on-chip memory. The problem is that this memory is not all DATA memory. In most cases it is configured as 256 bytes of DATA memory and the remainder is XDATA memory.

So, you must set linker's RAMSIZE directive to 256. The rest of the memory available on the chip will be in XDATA.

The reason you can't set the RAMSIZE to be larger than 256 is that the 8051 instructions that address internal memory only allow an 8-bit address. Therefore, the maximum size of internal memory is 256 bytes. And, that's what the 528 offers.

The additional 256 bytes of memory is accessed using the MOVX instruction. To use that memory in C, declare your variables with the XDATA memory specifier. Then, everything will work fine.

MORE INFORMATION

  • Refer to RAMSIZE in the BL51 User's Guide.

Last Reviewed: Tuesday, October 24, 2006


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.