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

Internal/External Memory Questions

Sorry for the newb questions, but I can't find the answers in either the UV2 or C51 manuals.

1) When UV2 gives the Program Data Size after building a project, is this JUST data (first 128 bytes), or is idata included in this total as well? I think it is all 256 bytes, but wanted to make sure.

2) If all internal data memory is exceeded, is the data simply truncated there or is it moved to xdata or something else?

3) I understand that access to xdata is slower than for internal RAM, but is it possible to put a quantification on "slower"? I realize this is likely micro dependent, but a ballpark would be fine. I'm using the T89C51CC01 from Atmel if anyone knows the exact value for that micro. Could not find this either in the CC01 manual.

Parents
  • Sorry for the newb questions, but I can't find the answers in either the UV2 or C51 manuals.
    did you work through the examples in the getting started guide, if not, drop what you are doing and do so.

    1) When UV2 gives the Program Data Size after building a project, is this JUST data (first 128 bytes), or is idata included in this total as well? I think it is all 256 bytes, but wanted to make sure.
    I do not know about uV2, I do not use it, but the Keil tools give all info in a .M51 file produced by the linker

    2) If all internal data memory is exceeded, is the data simply truncated there or is it moved to xdata or something else?
    No, you get a linker error

    3) I understand that access to xdata is slower than for internal RAM, but is it possible to put a quantification on "slower"?
    This is entirely depending on which derivative and which XRAM (many uCs allow control of access speed). Also for sequential access the difference may be different from that for random access.

    There is a simple way to find out:
    try both, look at the generated assembler, with the datasheet for your uC as a reference count up the instruction cycles NOT instructions required, then multiply that by clocks per instruction cycle.

    Erik

Reply
  • Sorry for the newb questions, but I can't find the answers in either the UV2 or C51 manuals.
    did you work through the examples in the getting started guide, if not, drop what you are doing and do so.

    1) When UV2 gives the Program Data Size after building a project, is this JUST data (first 128 bytes), or is idata included in this total as well? I think it is all 256 bytes, but wanted to make sure.
    I do not know about uV2, I do not use it, but the Keil tools give all info in a .M51 file produced by the linker

    2) If all internal data memory is exceeded, is the data simply truncated there or is it moved to xdata or something else?
    No, you get a linker error

    3) I understand that access to xdata is slower than for internal RAM, but is it possible to put a quantification on "slower"?
    This is entirely depending on which derivative and which XRAM (many uCs allow control of access speed). Also for sequential access the difference may be different from that for random access.

    There is a simple way to find out:
    try both, look at the generated assembler, with the datasheet for your uC as a reference count up the instruction cycles NOT instructions required, then multiply that by clocks per instruction cycle.

    Erik

Children
No data