Validate SparkFun RTC DS1307

I've hooked up a SparkFun RTC module to my Arduino, but I can't read out date/time info, or set date/time info, or set values into the RTC's auxiliary memory. I'm using the sketch from RealTimeClock \ Learning \ Wiring.

I'm wondering if somehow I fried the RTC when I soldered wires onto the connection pads. Is there a way to test to see if the RTC is functioning? I tried looking for a square wave output on my scope, but couldn't see one.

FWIW, when I use the IDE's Serial Monitor with that sketch I mentioned, it always reports the date/time as 00:00 0/0/0, and all the auxiliary memory registers are 0, too. From the documentation that implies the RTC has gone into backup mode. But I've checked the voltage at Vbat, and it's only 3.1 V (from the on-board lithium battery), and Vcc is at 5 volts, which should bring it out of backup mode.

  • Mark

Thanks. That's actually the same code as I was using, but from a different source.

I've solved my problem in the meantime, though. Turns out I was following a set of directions that must have been for a different board that's also based on the Wiring language. Those directions called for me to hook the data and clock lines from the RTC module up to digital pins 0 and 1.

It turns out that for the Arduino you need to hook them up to analog pins 4 and 5. Which makes just a little bit of a difference :slight_smile:

Once I made the correct hookups the module and sketch worked like a charm.