C51: RAMSIZE FOR THE PHILIPS 87C528
Information in this article applies to:
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?
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.
Last Reviewed: Tuesday, October 24, 2006
of your data.