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

89c51re2

I am using AT89C51RE2 AND KEILuvision4. I am trying to use 8k internal xram. Is their any sample code. How to use the internal XRAM of 89c51re2.

Parents
  • "If startup (or default) does not enable the internal XRAM the xdata is not cleared and initialized variables are initiaslized into thin air."

    Yes - but that has nothing to do with the placement of the variables into XDATA in the first place.

    It is the Compiler that decides (or is told) which memory space (DATA, XDATA, etc) a variable is to go into;

    It is the Linker/Locator that decides (or is told) which memory address (within its memory space)to assign to a variable.

    None of the above has anything to do with the startup code.

    Of course, if the startup code is wrong, runtime accesses to the memory spaces and/or addresses assigned by the compiler & linker are likely to fail.

Reply
  • "If startup (or default) does not enable the internal XRAM the xdata is not cleared and initialized variables are initiaslized into thin air."

    Yes - but that has nothing to do with the placement of the variables into XDATA in the first place.

    It is the Compiler that decides (or is told) which memory space (DATA, XDATA, etc) a variable is to go into;

    It is the Linker/Locator that decides (or is told) which memory address (within its memory space)to assign to a variable.

    None of the above has anything to do with the startup code.

    Of course, if the startup code is wrong, runtime accesses to the memory spaces and/or addresses assigned by the compiler & linker are likely to fail.

Children
No data