Observation: DS1307 RTC inaccuracy

When I first started using an RTC my supplier didn't have stock of DS1307, so I took a 1302 instead. I didn't realise the crystals are different, and I took the 12.5pF one (suitable for 1307) instead of the 6pF one (suitable for 1302).

Anyhoo, I used the 1302 for a while and with the crystal of wrong capacitance, it was pretty good.

So yesterday I hooked up the 1307, with the right 12.pF crystal, and it gained about 3-4 minutes overnight. That doesn't really fuss me since, as always, I'm just fooling around, but it's certainly not what I expected. That, btw, was on a "full" 3V coin cell battery.

Only thing I can think of is that the crystal maybe isn't a 12.5pF one although it was invoiced as such (waaaaay too small to see if it has markings, let alone read them) maybe it was still close enough to what the 1302 expected for it to be reasonably accurate but is way off what the 1307 needs.

I have become a fan of I2C btw: especialy since I'm about to experiment with atTiny with its limited number of pins, a bus is a great way of hooking things up.

(no answer for the RTC)

I2C is indeed great, I've used the PCF8574 a lot to get plenty IO lines.
Wrote a small lib for it, the code is the documentation :wink:
see - Arduino/libraries/PCF8574 at master · RobTillaart/Arduino · GitHub -

Ok this is weird. I reset it at 0800 today and it's still on time at 1900.

Maybe I didn't set it when I thought I did yesterday, and it was out all along. I'll check it before I leave for work tomorrow which will be about 22 hours running.

Given a crystal with a 20ppm tolerance, 2-3 seconds per day would be expected, so those initial results are about 100 times worse. Still on time after 11 hours is much more encouraging, hopefully it was a glitch that won't recur.