This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How much on-board RAM does the P89C669 really have?

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 
    even though the LX51 linker shows an EDATA class from 0x7F0000 to 0x7F04FF.
    Any suggestions would be welcome.

  • 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.

  • PLease can u give some reference design . How to do ISP.
    Thanx

  • PLease can u give some reference design .
    when addressing micro (u) use e-mail

    How to do ISP.<.i>
    FlashMagic, free from http://www.esacademy.com

    Erik

  • XDATA #include <REG668.H>

    #define on_XRAM() AUXR = 0x01
    #define off_XRAM() AUXR = 0x02

    sbit Led_Bit = P2^4;

    void delay(unsigned long us)
    {
    off_XRAM();
    while (--us > 0);
    on_XRAM();
    }

    void main(void)
    {
    #define POZ 4000
    char xdata i[4300];

    on_XRAM();

    i[POZ] = 100;

    for (;;)
    {
    if (i[POZ] == 100)
    {
    Led_Bit = 1;
    delay(40000);
    Led_Bit = 0;
    delay(40000);
    }
    }
    }