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

OnChip ERAM and External RAM access from C51

I am using AT89C5131 uC with hardwaired external 32K RAM from address 0x0000 to 0x07fff. I am able to read/write OnChip 1K RAM and External connected RAM by toggling EXTRAM Bit in AUXR register.

I wanted to declare huge amount of varaiables in both the RAMs for my static arrays by using -at- keyword. How can I do this in ERAM?

Parents
  • The question was why do you specifically want to use _at_, rather than let the tools do the locating?

    "Like data (for Direct Memory), xdata(External Memory) keil may be having keyword to access ERAM."

    "XDATA" should not be thought of as "External Memory".
    Yes, that's how the term originated way back with the first Intel 8051 - when it always was literally external to the chip - but many modern derivatives have on-chip XRAM.

    Instead, just think of "XDATA" as "memory accessed with the MOVX instruction"

    "ERAM" is probably just a name for "On-chip XRAM" - check the Datasheet

Reply
  • The question was why do you specifically want to use _at_, rather than let the tools do the locating?

    "Like data (for Direct Memory), xdata(External Memory) keil may be having keyword to access ERAM."

    "XDATA" should not be thought of as "External Memory".
    Yes, that's how the term originated way back with the first Intel 8051 - when it always was literally external to the chip - but many modern derivatives have on-chip XRAM.

    Instead, just think of "XDATA" as "memory accessed with the MOVX instruction"

    "ERAM" is probably just a name for "On-chip XRAM" - check the Datasheet

Children
No data