I am using a P89C669 and I am confused about the internal SRAM. The data sheets say there is 2K of on-board static RAM but the user manual shows that only 768 bytes in the on board XDATA space. However if a P89C669 device is selected as the target processor the dialog box shows a check box labelled "Use On chip XRAM 0x00- 0x6FF" What's the story or is my brain finally going to mush?
See section 2.2.3, "Extended Data Memory". The 2KB RAM shown in the block diagram appears to be divided as 1280 bytes of EDM (data, idata, and extended idata) and 768 bytes of xdata. Seems like the only way to access the extra memory is through the extended SP or Philip's funky Universal Pointer mode. I didn't see a way to map the EDM to xdata instead.
2.2.3 EXTENDED DATA MEMORY (EDATA) The 51MX architecture allows for extension of the internal data memory space beyond the traditional 256 byte limit of classic 80C51s. This space can be used as an extended or alternative processor stack space, or can be used as general purpose storage under program control. Other than Stack Pointer based access to this space, which is automatic if Extended Stack Memory Mode is enabled (see the following Stack section), this memory is addressed only using the new Universal Pointer feature. Universal Pointers are described in a later section. P89C669 has 1280 bytes of SRAM in EDATA memory. 2.4 EXTERNAL DATA MEMORY (XDATA) The XDATA space on the 51MX is the same as the 64 kB external data memory space on the classic On-chip XDATA memory can be disabled under program control via the EXTRAM bit in the AUXR implemented on-chip XDATA will be routed to the external bus by default. If on-chip XDATA memory accesses will be routed to the external bus. P89C669 has 768 bytes of on-chip XDATA.
Thanks for the info. I have the PK51 kit that allows access to the funky features of the MX51 family, but I can't find a way to access the EDATA memory for storage of variables. (I have run out of XDATA space) The compiler doesn't accept a declaration such as
int edata variable1
I don't actually use this part (just downloaded the data sheet and user manual yesterday when I saw your question), so I'm afraid I can't help much. This "edata" business is an extension unique to the Philips architecture. You'll need to use the CX51 compiler (instead of C51) to get support for the "universal pointers" which seem to be the only way to access this Philips edata from C. PUSH and POP would work, but don't help much in a HLL. The linker manual says EDATA segments are used for near variables. But near isn't listed as a keyword for the compiler. (You could try declaring a near variable anyway, I suppose; maybe it's just an omission in the documentation.) You might be able to use the linker CLASSES ( EDATA () ) directive to move EDATA to proper location. But I'm guessing at this point, since I don't use an MX architecture part.