strange (for a newbie)  old EEPROM behavior... - Page 1
Forum section: electronics / beginners

author: alecto
author_rank: Contributor
timestamp: August 15, 2014, 11:01:22 am
content: First of all, Hello everybody...my first topic and already a question...(aah those newbies....)don't worry I won't be too bothersome...I like to understand things by myself ...but with this one I am a bit perplex...so to make it short I have 3 eeproms on the I2C bus of an Atmega 328-AT24C04C (I recently purchased)-24C04N (a National Semiconductor dated from 1985)-24C04B1 (an ST dated from 1993)I couldn't find any exact datasheet for the two older ones but connected them anyway on my breadboard the same way I did for the AT24C04C except that hooked pin1 to Ground in case that this pin was a "Write Protect Enable" as I've seen more than once in my search for the datasheets .I use the Wire Library for arduino...and I can read and write each eeproms...briefly, I write data at an address n and I read that same data at adress n...But for the 24C04B1 I had to do a little "compromise" in my coding since I have to read the eeprom at starting address n-1...So finally not so much of a problem... but as I said before I am perplex, is it some specificity of that particular chip or is it some consequence of a strange side effect in the Wire library...or something else...if it comes from the Wire Library send me just an ACKI plan to go deeper in it in the near future anyway...But if it is something else that my newbie brain can't figure out, any short explanation would be more than Welcome...PS I know this precision is not really usefull but as you may have noticed my native language is not English...I just hope I have been clear enough tough...here I am , reading my message for the third time and it seems.... ok...

author: wraper
author_rank: Unknown
timestamp: August 15, 2014, 06:35:53 pm
content: Usually 24C04 has device address selection pins A0-A2 (1, 2, 3). On different variants of 24C04 A0 can be NC or write protection. Even all address pins (1, 2, 3) can be NC on some variants.

author: alecto
author_rank: Contributor
timestamp: August 15, 2014, 07:53:11 pm
content: Quote from: wraper on August 15, 2014, 06:35:53 pmI knew that.....i can even confirm that pin 1 is write protection (tested today) so that let me with A1 and A2....so that i can adress it (with the Wire library) depending on the wiring of A1 and A2 with adresses from 0x50 to 0x57...i repeat that poses no problem...I can read any adress on the chip and I can write to it also...I understand the select code of those eeprom....BUT strangely with this particular chip when I write to adress 10 for instance I then have to read at address 9 to have my data... when I can read adress 10 for the other chips (I even tested a M24c16 with only NC for pins 1,2,3 and it works like a charm...)I tested to see if it wascompletelywritable an readable andit is...so I think I can rule out some kind of malfunctionI know I'm a newbie but that was a bit condescending...but thanks anyway for the reply....I'll figure it out...

author: wraper
author_rank: Unknown
timestamp: August 15, 2014, 09:27:49 pm
content: Didn't you try to slow down the thing? Maybe I2C speed is too high for that IC. Old 24C04 can do up to 100kHz so anything higher may cause problems.

author: alecto
author_rank: Contributor
timestamp: August 15, 2014, 10:35:50 pm
content: i'll try that tomorrow...it's a bit late...and i was about to go to sleep...but that's exactly the kind of idea i needed....and even if i haven't tested it yet , i already feel that's it...that makes much more sense than my idea of side effect ...thank youI'll post the result of my testing tomorrow...now I'm going to sleep beter