Hi guys,
i connect arduino with a i2c clock (byvac) and i can set/read time.
When i disconnect vcc from the clock everything goes well, but if i remove vcc from the arduino RTC lost time. I think thatthere is some poblem with SDA/SCL bus..

Please help

thank you

What RTC are you using?

Usually they have a little coin cell to keep the time for when VCC is removed. I2C is a pull-up bus, meaning voltage can exist to keep your RTC running as long as there is power on the lines.

Sometimes the coin cells (Typically CR2032) have a plastic layer you have to peel off for them to make contact.

In any event, they have no built in power source, and depend on an external voltage to keep running.

hi, i am using BV4236 by BYVAC.
It has a battery inside, in fact when i disconnect VCC from the rtc it keeps time when i reconnect it it has the correct time.
But when i disconnect arduino times lock.

I managed to find this note in the datasheet

When power is removed form the RTC it will
retain the current time and this can be read
using the above. The clock will appear to have
stopped until the HT flag is cleared, this must
be done for each power down/up cycle.

Yes brutus i clean the flag avery start up...
Yesterday i tried to put a 2,2 mf capacitor between vcc+ and ground and now it seems to work :slight_smile:
Today i restabilish connection with vcc+ and i see it has lost 30 minutes..
I have to check this mistake..
Thank you

I bought the BV4236-I2C RTC and I got your same problem,
I'm loosing my mind cause I've got no idea to explan that....
Did you finally were able to undestand why it works so strangely??