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

i2c routine

-i am interfacing the 8051 with the 24c64
-in that some values are manually written to eeprom and some are stored using program
-i am accessing the location 195th to (195+60)-range
which is not used before
-i am using a buffer to store the values i.e. required location to buffer and from buffer to eeprom
-this is stored properly because i am debuging it and i am getting corret
-but when i am trying to read from the eeprom eg-reset the software (eeprom is read at the power on)
my values not stored
-are they changing anywhere????
-if so then how to debug those areas

  • i am using a buffer to store the values i.e. required location to buffer and from buffer to eeprom
    -this is stored properly because i am debuging it and i am getting corret

    How do you know if the values are not written or not read? do you wipe the buffer between write and read

    in that some values are manually written to eeprom and some are stored using program
    What do you mean by "manually written"

    Erik

  • So you are using I2C routines .. if you could specify what variant of the x51 you are using and a few other things people might be able to help you. If you are using hardware (the x51) or software to perform the I2C functions affects this as well. What specific X24c64 EEPROM you are using? There are numerous factors that can influence your success in this case all of which depend on what processor, what EEPROM, and what software is handling the EEPROM. Showing some code might help immensely.

    Stephen

  • i do not wipe the buffer in between
    manually written means using programmer hex file is loaded in the eeprom
    i am using atmel 24c64-with c8051f020
    can we write the more values at a time because i hav tried with the set of values-(set value, actual value, percentage) i face problem but i separated the routines and saving it individually and now it is working

  • hi,
    my routine is working
    i m saving 60 readings and 2 readings are not getting saved is it related to any location of eeprom

  • 24c64
    -it is normal atmel ic having 64kbits memory
    -i m using smbus routines which are requred for c8051f020 ic

  • You could easily test that by writing to a different location in the EEPROM:

    * If the problem goes away, it was probably to do with the specific location (whether a hardware fault in the EEPROM or an error in your code that incorrectly handles that particular address or range);

    * If the problem persists, it is probably an error in your code.

  • hi
    i changed the location of storing my value and now i m getting the saved value at the power on i.e. at power reset
    i also tried with my another storing routine which was working fine
    i changed the location (which i was getting wrong) in my working code and there also i got the same error of location
    so i changed the position of storing, this was about my 1st location problem
    -one more thing i noticed with my 2nd one location that my working routine was working well with that location but my new routine wasn't
    -so i shifted that to some other location and now my new routine is also working
    -means: 170 to 190 my data1 was stored. From 191 to 211 data2 was stored but it used to give me the wrong value at 191to194 so i shifted the whole data2 at 201 to 221 and now my new code is also working can u explain me this problem???????????????

  • and i hav checked that there was no overlapping or data overwritten in the location 191

  • i changed the location of storing my value and now i m getting the saved value at the power on i.e. at power reset
    fuzzy, fuzzy, fuzzy

    Try, say, 8 locations spread across the capacity of the EEPROM and post which works and which fails.

    Since you are using a SILabs derivative (not deviate) you can find working code using the CodeArchitect, free from http://www.esacademy.com. Modifying CodeArchitect code to SILabs only takes a few minutes and you may just, in that code, find what your problem is.

    Erik

    SILabs derivatives: F0x, f1x, f2x
    SILabs deviates: F3x - up