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

about the multi-data reading and writing from EEPROM of T89C51RD2

hi all
Now I can read and write single data correctly from eeprom of T89C51,which through calling my single eeprom read and write functions.

Because my emulator can't support the chip's eeprom rd/wr,so I must download my code to chip for testing.

When I want rd/wr some datas from eeprom,I found that,when I several call the write function for writing some data,the first function will play role,and the writing data is correct,and the other called writing function will running,but has not role for writing,through my read eeprom functions and the led display, I can know it.

I have considered all kinds of problem, the writing starting addrss,the writing address is different,and call the wrting function for some delay time:20ms or 2s,and the keil environment is considered,but I have the same problem. I don't know where is wrong? or,how can I get the right values? could you give me some advice?

  • Sorry, but I think you'll have to explain that again. Your description of the problem apparently got completely mixed up in the translation from your first language into English.

    So, try it again, please. In short sentences, using only words whose meaning you're absolutely sure you know. E.g. it's a complete mystery to me what "role" of functions you're talking about. Tell us what exactly youre code is doing, in what order, and how it fails to do what it's supposed to.

    You say the chip's EEPROM is not supported by your "emulator" --- is that an actual emulator (special debug hardware), or the Keil uVision2 builtin software-only simulator?

  • hi,
    please read not only datasheet of device but its errata as well:
    http://www.atmel.com/dyn/resources/prod_documents/doc4101.pdf

    There is note No15 there which says:

    15. EEPROM Data Writing Sequence
    
    When writing EEPROM Data, the memory location(s) may not be correctly programmed.
    Workaround
    The write sequence needs to be executed 3 times to ensure proper programming.
    

    Regards,
    Oleg