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

addressing 24c04

hi i am using the controller P89c51RD2BN and eeprom AT24c04 my i2c routine read and write the data perfectly. but upto the address 116 D (0x74) if i am trying to store any variable beyound this address my display shows garbage(it hangs) but ALE signal is presents. can any one help me to solve this

  • "can any one help me to solve this"

    Not on the basis of the scant information you've given!

    If the display hangs, how do you know that the fault is with your I2C routines, rather than your display routines?

    How have you determined that ALE "is presents"?
    If you have an oscilloscope, have you used it to examine what's happening on the I2C lines?

    Have you tried it in the Simulator?

  • First of all thanks to showing intrest in this topic

    HHmmmmmmmmmmm ok!!!!! As i stated earlier the i2c RD/WR routine is perfect as i used all this in many other system but the thing on which i am orking now requires lots of data to be store in eeprom so i start incrimenting the address but at one point i found that when i trying to store the data to addtress (0x74) or more than that the unexpeted thing start happening as i firstly cheacked in SIMULATOR all the thing are fine. after reading the data sheet again and again i found that the problem is with A2 A1 A0/P0 (i GROUNDED all these in my enitial H/W with Device RD/ WR address 0xA0 and 0xA1 ) the i tryed it with some modification A0 pin floating and with Device RD/ WR address 0xA1 and 0xA3 but it not works. i am still confuse with these thing

    now i changed EEPROM AT24C04 to AT24C02A and thing are fine A2 A1 A0 WP are grounded

    can you tell me how this happened

  • "As i stated earlier the i2c RD/WR routine is perfect (sic) as i used all this in many other system"

    No, it is clearly not perfect - because it doesn't work for addresses above 0x74!

    It is a very common misconception that, just because you've never seen a problem, there are no problems - I call this the "Proven Product Syndrome"

    In fact, what you have is almost certainly a bug that has always existed in your routines but, until now, you've just been lucky and never been affected by it.

    So, go back to your original design:
    Was it specified to work for addresses over 0x74?
    Was its operation tested for addresses over 0x74?
    If it was tested, what were the test conditions, and how did they differ from your current usage?

  • Wasn't there a post a while back about I2C routines that only worked up to a certain address...?

  • "it is clearly not perfect - because it doesn't work for addresses above 0x74!"

    There's a proviso here: maybe your software is OK, but your hardware design is wrong, and/or your hardware implementation is wrong or broken.

    This is why it's totally inadequate just to say, "my display shows garbage (it hangs)".
    You need to do some testing and investigation to find out exactly what is happening!

    Again, have you used an oscilloscope to check what's happening on the I2C lines?

  • thanks i will cheack all the things and be back to you

  • now i changed EEPROM AT24C04 to AT24C02A and thing are fine A2 A1 A0 WP are grounded

    can you tell me how this happened

    I sit in a hotel waiting for as part, so I took the time to have a good look at the datasheet. There are several places where the 2k and 4k devices differ, such as page read and page write. since all you say is "it does not work (with the '04) I an only suggest you have a good look at the differences, notably the use of a0 in the larger device which I GUESS is the source of your problem.

    Erik