+ Post New Thread
Results 1 to 4 of 4
  1. #1
    Junior Member level 1
    Points: 437, Level: 4

    Join Date
    Dec 2010
    Posts
    15
    Helped
    3 / 3
    Points
    437
    Level
    4

    problem with the eeprom 24cxx

    Hi all!
    i am using 24c02 in my project. and i have a reading problem.

    for example
    i send some different bytes to eeprom and read them back.

    when i watch the transfer in isis i2c debugger,

    whatever i sent, i always read the one that i last sent.

    im sending a picture of debugging screen

    Click image for larger version. 

Name:	debug.png 
Views:	14 
Size:	19.1 KB 
ID:	65475

    How/why can this happen? please help me about this.
    Thank you!

    •   Alt9th December 2011, 23:06

      advertising

        
       

  2. #2
    Super Moderator
    Points: 236,364, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    40,881
    Helped
    12493 / 12493
    Points
    236,364
    Level
    100

    Re: problem with the eeprom 24cxx

    I see, that you have a stop start sequence between address write and data read. The datasheets requests a repeated start instead. Even if it isn't a problem with the real chip (I don't actually know), it may be a problem for Proteus.



    •   Alt9th December 2011, 23:35

      advertising

        
       

  3. #3
    Junior Member level 1
    Points: 437, Level: 4

    Join Date
    Dec 2010
    Posts
    15
    Helped
    3 / 3
    Points
    437
    Level
    4

    Re: problem with the eeprom 24cxx

    hello again,

    after i wrote my problem here, i had an idea and tried it.

    so i solve this problem.

    here;
    i have changed the 24c02 eeprom with a 24c32 eeprom. and the codes worked.

    So, i understood that i was sending the address data as a word (example: 0x0010)

    After that, i corrected my codes and i sent the address data as a byte (example: 0xff). and changed the eeprom with 24c02 .
    And the codes worked.

    So, we understood that if our eeprom includes 256x8 bit, we must not use word address. :D

    See you!



    •   Alt10th December 2011, 01:11

      advertising

        
       

  4. #4
    Junior Member level 2
    Points: 339, Level: 3

    Join Date
    Jun 2012
    Location
    Bangalore,India
    Posts
    24
    Helped
    0 / 0
    Points
    339
    Level
    3

    Re: problem with the eeprom 24cxx

    hai i am doing project using pic18f458 and eeprom 24c02 & i done read write operations correctly but its memory is only 256 bytes , i need memory more than this so i choose eeprom 24c32.

    In 24c02 i am writing only "one 8bit" data but in 24c32 i need to write "two 8bit" data,so i need to know how to write two 8 bit data.


    ex:for 24c02
    let m3=10;//memory location
    i2c_eeprom_write(m3,0,dat[0]);
    m3=m3+2;
    whatever data in the dat[0] its writing in memory location m3 i.e 10 and i don't know o in above i2c_eeprom_write instruction ,in eeprom.c its given like i2c_eeprom_write(unsigned long int addrh,unsigned char addrl,unsigned char data)



--[[ ]]--