<Answered> I2C question

I am preparing to put a project together, which will include 3 I2C devices.

As each part comes to hand, I run then using the test sketches that come with the libraries.

My 20x4 display has an I2C address, but the RTC does not. I hope the SD card module has an address, but it hasn't arrived yet.

Will the fact that the RTC has no address, cause any problems? Commands sent to the RTC will just be ignored by the display, but the other way around?



SD cards are usually SPI, not I2C. Which RTC are you using? If the RTC is actually an I2C device, it has an address. You will need to look at the data sheet to know it.

If you have an i2c device, then that i2c device has an address. By definition.

Most i2c devices have some jumpers or DIP switches allowing you to set the address to one of a limited number of possible values, allowing you to hopefully find a combination of settings that don't collide.

Do you have a part number of some sort for this RTC?

Hi guys

The RTC is a DS1307, and it appears, from a rereading of the data sheet, that it does not have a settable address but uses one that is hard coded into the chip. In this case it appears to be 1101000. RTBM more than once!!!!!

Attached are pics and schematic for the module.

RTC_Module.pdf (6.1 KB)

The RTC libraries that I have seen (and used) have the address of the DS1307 coded into in the header file. Many I2C capable parts have a single fixed and unchangeable address. That is kind of a disadvantage of I2C.

Just FYI Lady Ada I2C address reference


This is what fooled me. I don't recall having come across any devices that didn't have selectable addresses. That, though, doesn't mean a dicky-bird. :=))


Thanks for giving me the nudge to go and reread the data sheet. It is surprising the info you don't see when you aren't necesseraly looking for it.



Lady Ada I2C address reference

Wow... weird to see an old ladyada-style page.

I cut my Arduino teeth on the old tutorials before they levelled-up the adafruit site.

Yeah, its one that I had bookmarked from my early I2C explorations. There are probably more up to data pages, I just wanted to show examples of addresses and how many are fixed.