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

The internal expanded RAM(XDATA) on AT89C51RB2 cannot be used

Hello everybody, I am testing a program for AT89S54(AT89C51RB2) with uVision2.As you konwn,this chip has 768 bytes expanded RAM(XRAM).I want to use the XRAM for my program,but the XRAM space cannot be accessed. The site of AT89C51RB2:")
REGFILE=AT89C51RB2.H("Atmel")
SFILE="STARTUP.A51" ("Standard 8051 Startup Code")
SIM=S8051.DLL DP51.DLL("-pATRB2")
____________________________________________________

And in the option of my project,I have defined as below.
Selected__________________________________
_______Memory Model:[Large:varialble in XDATA]
Checked BOX______________________
_______Use On-chip XRAM(0x0-0x3FF)

What should I do for setting uVision2?

Thanks in advance.

Parents
  • Hi,

    Most people on this forum are very good with hexadecimal numbers.

    OK.I'll do it so.


    OH you are using the large model, I just can't visualize anyone doing that. That may explain the above.

    And in my program,

    #include <AT89C51RB2.h>
    extern void DispByteData(unsigned char arii);
    unsigned char ipdata[142];
    #define  XNUM 100
    unsigned char xdata  xbuf[XNUM];
    

    The memory is used apparaently as below.
    ______1d + 142d + 100d = 243d (bytes)
    About the rest of part
    ______256d-243d=13d (bytes)
    I will recompile my program in another mode,and report the result.

    marc

Reply
  • Hi,

    Most people on this forum are very good with hexadecimal numbers.

    OK.I'll do it so.


    OH you are using the large model, I just can't visualize anyone doing that. That may explain the above.

    And in my program,

    #include <AT89C51RB2.h>
    extern void DispByteData(unsigned char arii);
    unsigned char ipdata[142];
    #define  XNUM 100
    unsigned char xdata  xbuf[XNUM];
    

    The memory is used apparaently as below.
    ______1d + 142d + 100d = 243d (bytes)
    About the rest of part
    ______256d-243d=13d (bytes)
    I will recompile my program in another mode,and report the result.

    marc

Children
No data