i2c eeprom question

Hi, I am using successfully the DB library (DB.h) but I cannot find where is specified the I2C address of the EEPROM (0x50). When I am using my I2C RTC clock, I am using the Wire.h library which requires me to specify the I2C address of my clock, why this is not the case with the EEPROM? Is it hard coded somewhere? Thank you.

but I cannot find where is specified the I2C address of the EEPROM (0x50). When I am using my I2C RTC clock,

Which EEPROM, which RTC?

THe I2C RTC is the one of Gravitech.
THe I2C EEPROM, the ‘classic’ 24LC256

strus_fr:

Considering that this is such an important piece of information I can't understand why the manufacturers make it so hard to find.

On the Microchip datasheet (21203P.pdf) I found the information in section 5.0, Device Addressing. You want to look at the information about the 'Control Byte'.

Gravitech is specifying the base address as 0x50 (0b01010000) which is correct before it is shifted left. After shifting it becomes 0xA0 (0b10100000). The upper nibble (1010) is what Microchip calls the 'Control Code'.

Don

Well, I am not sure to understand your answer. My issue is not with the RTC clock since it works fine on 0x68. The issue (even if it works fine too) is that I cannot understand why I do not have to specify the I2C address of the EEPROM in my code. I hope the question is clearer.

strus_fr

Well, I am not sure to understand your answer.

That's not surprising - I answered the wrong question.

I am not familiar with the library that you are using, perhaps someone else can help.

Don

strus_fr:

I looked into this DB library:

http://www.arduino.cc/playground/Code/DatabaseLibrary

If this is the one you are using then the answer is on the first line.

Here's a little database library that makes use of the Arduino's EEPROM memory to store records in a table.

It is not using the 24LC256!

Don