I2C Serial EEPROM Compatability (Atmel vs Microchip)

Hi,

I need to implement two external (I2C) EEPROM chips in my project, one small (4KB) to store configuration data and one big (128KB) to be used as a circular data logger (yes, I know about the SD card option, but I don't want to implement SPI just yet). Unfortunately I can't find a single supplier of both sizes (in stock anyway). I can find the 4KB chip made by Microchip (data sheet : http://ww1.microchip.com/downloads/en/DeviceDoc/21713L.pdf), and the 128KB chip made by Atmel (data sheet: http://www.atmel.com/Images/doc5194.pdf).

I was planning to use the code provide by the AT24C1024 I2C EEPROM Library in the Arduino playground (Arduino Playground - I2CEEPROM24C1024), but that was developed based on an Atmel chip.

My question is, can I use the same code to talk to chips from both manufacturers?

Both chips are pin compatible, and both support I2C, but I've heard that I2C can be implemented differently.

Does anyone have any experience, insights or opinions?

Thanks.
-Mitch

FWIW, I'm already using I2C to talk to my Real Time Clock chip.

well they have separate addresses so you should be able to use both together

Why don't you use 4KB from the 128K one for configuration?

The logging space would only be 4% smaller and it would enable you to have a config file larger than 4K in the future ...

2 cents,

That is a very good question.

In a word, cost. The price difference is significant ($0.50 for the Microchip 4KB vs $4.00 for the Atmel 128KB). Not a problem for a few boards, but adds up if I end up making many.

Also, the data logger is for development/debugging purposes only. Once the design stabilizes, I won't need anything more than 4KB. If the two chips are code compatible, then your suggestion is perfect. I'll use the 128KB Atmel chips while debugging and otherwise use the Microchip 4KB config only chips.

-Mitch

Regarding the two chips using separate addresses, are you sure? Looking at the data sheets I see that they both use a Device Address of '0101A2A1A0R/Wbit0'.

Am I misreading the data sheet?

-Mitch

but if you use separate pins to address them ...

Oh, right. Of course. -Mitch

Digikey has EEPROM from 128B to 4MB. If you filter it down, Atmel has SMD EEPROM from 1K to 1M.

The 4K is as low as $.23 SMD and the 128K is as low as $.936 for the SMD version. If you need through hole, the 128K is only $1.11 and the 4K is $.41. These are both I2C interface.

Even the 1MB DIP package is less than $4.00

Digikey is your friend!

I am also unsure why you can't just use a small chunk of your bigger chip for config data. I think you missed the point of the earlier post. He wasn't implying buying two 128K chips. He was saying use 4K of your 128K for config and the rest for datalogging.

I actually was searching Digikey. I do prefer through the hole since I'm building this by hand (for now), but I don't see the parts you are referring to. Are you sure you filtered on 'In stock'?

Can you send a link to the page you found?

I do appreciate your feedback

As for using a small chunk of the big EEPROM, that is fine for development/debugging, but if I start to turn out a lot of these I won't be compiling in the logging code, so I'll have no need for the extra space. That was my original problem. If I can only get Atmel 128KB parts and Microchip 4KB parts, then I need to know that they are interchangeable from a code perspective.

-Mitch

mmcp42:
but if you use separate pins to address them ...

IIRC, you connect the 3 address pins on the EEPROM to GND or not to specify their addresses. So you can say EEPROM0 has address 000 if you connect all its address pins to GND. Then EEPROM1 can have address 001 if you connect A2 and A1 to GND and leave A0 disconnected (internally pulled up IIRC). You use the same I2C bus lines to control up to 8 EEPROMs.

Just a word of advice for Mitchell, try separating your layers of code that does your project and the layer that accesses EEPROM. This way you can replace the EEPROM access layer without changing your program. That's what I would do. Just in case you decide you need 4GB in the future and go with SD card, if you have the code well separated, you can just replace the EEPROM access layer with SD card access layer and add some file creating etc. stuff and you're good to go.

Your code may be longer and less optimized but the return is you have more flexibility.

Here is the DIP 4K Atmel I2C interface:

Here is the DIP 128K Atmel I2C interface:

The128K does say is a non-stock item but they have over 700 in stock. If this is simply a temporary part for testing purposes at $1.11 you could buy 10 of them to get you through test and proto for less than $15.00 after shipping.

I also did a sort by Microchip to see what they had and I got the following:

Both in stock DIP I2C and less than $1.00 each.

I'm not sure how you are searching Digi but search for eeprom and check the instock box. When you get the list, select the Integrated Circuits\Memory Option. Filter first by serial, then by i2c. After that you can filter different ways to get what you want.

Here is a link to my intial search, I am not sure how this link will translate: