3

I have a portable project on my Raspberry Pi Zero and I am using a i2c 0.96" OLED on the SDA/SCL pins on my Raspberry Pi. I would like to add a RTC Module to my project, but all of the tutorials I have seen involve using the SDA/SCL pins for communication.

I have not purchased an RTC module yet. The OS that I am using is Raspbian Lite. Is it still possible for me to install an RTC module on this project?

  • 4
    You can have more than one device attached to the I2C Bus. They just need to have separate addresses. Most I2C modules allow changing the address via a jumper or solder bridge, but if the other device is not a RTC this may not even be an issue. – Steve Robillard Mar 14 '19 at 13:57
  • @SteveRobillard That's pretty much the answer. – joan Mar 14 '19 at 14:22
3

As others have commented, yes, you can have multiple I2C devices (that's the whole point of a bus!)

Make sure that you only have ONE set of pull-up resistors on the bus. Presumably your oled card already has them, otherwise it would not be working. Unfortunately, many I2C vendors put pullups on their boards; the better ones put solder jumpers that you can break off. Either way, make sure the rtc module you use either has some way of disabling its own pullups, or that it doesn't have any.

  • Do you have an RTC module you would recommend? Thanks for your help! – CHill Mar 15 '19 at 1:09
  • Pretty much anything based on the DS3231. You can get them on Aliexpress for about USD 1, and they even include an EEPROM on the board. No point in posting any links, as aliexpress stores come and go (the one I got ten from a few months ago no longer exists). Adafruit also has one if you can't wait for Aliexpress to deliver, but it's a lot more expensive. – JayEye Mar 18 '19 at 0:05
  • I just looked at Adafruit's. It's currently out of stock, and it does have pullups, but they are 10K and shouldn't be much of a problem if they are the only other thing on your bus. You can always desolder them :) – JayEye Mar 18 '19 at 0:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.