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

dynamic functions

Hi,
I'm trying to load functions from an eeprom to the memory of a T89C51RD2 and then call the function. Is this possible? And how?
Accessing the data on the eeprom is no problem but how can I copy the functions into the code segment?

Thanks,
Kamil

  • I'm trying to load functions from an eeprom to the memory of a T89C51RD2

    You want to copy the code to "the memory" --- well, which memory, exactly?

    Generally, you cannot copy anything into an 8051's code segment, because that is read-only by definition of the architecture. What you can do is electronically create an off-chip memory region that is both a code and an xdata segment at the same time --- a so-called von-Neuman memory organization. If you're lucky, you can even do that with the on-chip XRAM of your 8051 variant.

    Once you've achieve that, you can write to the xdata and execute it as code.