Electronic – arduino – MCP79411 not “ticking”

arduinocrystaldebuggingrtc

I'm using the Microchip MCP79411 Real Time Clock. I can communicate with the device, read the MAC address from it, write to the EEPROM function and read back those values, but the Time and Date registers always read the same values.

I probed one of the leads of 32768Hz crystal with respect to GND and observed the following scope trace:

32kHz crystal scope trace

I'm sure I've set the ST bit to start the oscillator (or the crystal wouldn't be ringing right?). The frequency looks about right. The only thing that seems suspect to me is that the oscillator is only ringing with a peak voltage of about 250mV. I'm running the IC supply voltage at a regulated 3.3V. Is this normal? What could be causing the RTC to not be counting?

In the interest of full disclosure, the crystal I'm using is an Abracon AB26T-32.768KHZ and I have neglected to include explicit load capacitors on either leg of the crystal. Could that explain the low peak voltage? How should I debug this problem further?

For what it's worth, the Arduino sketch I'm using to test communication with the device is available for review here.


UPDATE

If I take a 22pF capacitor with one leg attached to ground and hit the other leg of the capacitor to the case of the crystal the RTC starts ticking, even after I remove the capacitor altogether. This is specifically to the case, it doesn't happen if I do it to either of the legs of the crystal… It's almost like putting some capacitance on the case to GND kick-starts the RTC. Tne benavior is the same if I simply connect the case to GND with a piece of wire (i.e. no discrete capacitor). What's the explanation for this?

Best Answer

We were using the same real-time clock in one of our designs and also having problems. In our case the clock was running erratically or slowly. After discussing the problem with Microchip we were told that the low power oscillator used in this design requires very low capacitance crystals. I would double check to see if your crystal meets the requirements published in the datasheet and if not replace it.