RV3028 using Arduino and I2C loses time

Hi all. New to this forum.

I have a pimoroni rv3028 RTC. Using the set/read time example from the rv-3028-c7 Arduino library the time is ok using serial monitor. When I use an I2C display, ssd1106, it loses time. 1 second per hour is the best I have managed with 2.2k pull-ups and 400k clock speed on the I2C bus.

Has anyone had similar?

Thanks Vaughn

Just a FYI post.
I have a bunch of Pimoroni rv3028’s in use here. Nothing on the Arduino side though. All good with Python on a Pi, and Micro Python on Pi Pico’s.
I’m no expert, but I wouldn’t think an i2c issue would affect the accuracy, IE cause drift? Not once the time is set on the breakout?
Is this the Pimoroni RV3028 breakout? And if yes, is the battery OK?

One second per hour is a lot, I never saw something this large even with very cheap RTCs. And the RV3028 is more on the high-end side…

I don’t know which display you use, but the rv3028 already has 10K pullups. 2.2k pullups are on the high side, normally the 10K should already be enough. If your display adds another set of pullups, your I2C-signal might not be clean enough. This all depends on the actual voltage levels you are using and also on your specific setup (e.g. your MCU, capacitance on your bus and so on). To check this, you would need an oscilloscope/logic analyzer.

I don’t know the library, but the datasheet is very specific about corrupting time if I2C writes are not done in a timely fashion. To really track this down would require to analyze the code of the library and compare it with what the datasheet recommends.

1 Like

Yes to both!

It is definitely to do with the I2C and the display. If I use serial monitor and not the display all ok!

Thanks