Electronic – Does polling a DS1307 too frequently affect accuracy

i2crtc

I did some research, and I found contradictory response on the web. I'm polling a DS1307 on an loop, with an Arduino, that takes about 20 ms to run, so basically I'm polling the I2C interface 50 times in a second. Is this affecting the time accuracy of the IC?

ADDITION
I did a lot of testing and I2C wasn't causing any clock drift, my poor accuracy had another cause, see this question.

Best Answer

It shouldn't. The DS1307's i2c timings are measured in Micro and Nano Seconds. 20ms intervals are nothing compared to that. As long as you give atleast 4.7 µs between I2C Stop and Start signals, you should be fine.

Additionally:

When reading or writing the time and date registers, secondary (user) buffers are used to prevent errors when the internal registers update. When reading the time and date registers, the user buffers are synchronized to the internal registers on any I2C START. The time information is read from these secondary registers while the clock continues to run. This eliminates the need to re-read the registers in case the internal registers update during a read. The divider chain is reset whenever the seconds register is written. Write transfers occur on the I2C acknowledge from the DS1307. Once the divider chain is reset, to avoid rollover issues, the remaining time and date registers must be written within one second.

Considering that Dallas/Maxim doesn't list a minimum poll time below that would suggest you are fine.

But a question, why poll it so often?

Related Topic