How to synchronize two RTC's

Hi

I have 2 identical DS3231 RTC modules and would like to synchronize them precisely. Relying on the time update through the compiler is too slow.

I was thinking of setting the time on one with a GPS, and then somehow “cloning” that time to the second RTC.

Would it be possible to change the I2C address on one RTC and then connecting both and somehow push the time to BOTH RTC’s? Does sending the time update over I2C go to all connected RTC’s? I haven’t seen time setting code that specifies the I2C address.

Any help appreciated.

Johnny

The DS3231 has a control bit /EOSC that stops and starts the oscillator, so you could preset the RTC to some time in the near future, and start the oscillator at the correct moment. You need the chip to be battery backed for this to work, and set the bit so that the oscillator starts when the chip is powered from Vcc. You need to reset that bit afterwards, or the RTC won’t keep time while powered by the battery alone.

The data sheet doesn’t go into detail about the startup time, and two DS3231s will inevitably drift away from precise synchronization, so this method will not keep track of time nearly as accurately as a GPS-disciplined clock.