DS3231 RTC : what can be done with the SQW and 32Khz pins?

Hello all :)

I bought a DS3231 RTC breakout board:

I've read DS3231's datasheet, but I'm still wondering what are those pins SQW and 32Khz. Can someone explain what they are, and how useful they can be, what is their typical use, etc...

Thanks in advance :)

If I recall correctly, SQW is a 1 Hz Square Wave. I guess you could use it to calibrate the internal 8MHz RC oscillator (if you use it) to get better serial bit rate accuracy.

32Khz pin is the direct output of the onboard TCXO, the SQW pin is a dual mode pin which can serve as an open drain interrupt (on the Alarms) or a programmable square wave output which fq depends on the values in the RS1 and RS2 registers (1hz, 1.024Khz, 4.096Khz, 8.192khz). I love this chip and have used it quite a bit :)

Ok thanks I understand this but I'm very beginner about hardware, what I don't understand is, what those pins can be used for? Can you give an example?

what those pins can be used for?

The 32KHz output can be used to measure the crystal controlling the time with a digital frequency meter. The capacitive loading across the crystal can then be adjusted to get as close as possible to being exactly 32KHz for greater long term accuracy.

The SQW output could be used for:- 1) Generating an interrupt to update the processors real time clock. 2) Generating an alarm signal to bring the processor out of a sleep mode. 3) Generating an interrupt when an alarm event occurs.

Ok thanks, can I do something else, like for example, wire the SQW pin (set to 1Hz), to a relay's low level input, to turn on/off a light every seconds, without the need of the Arduino? Can it be used as an alternative to a timer such as the 555 timer chip? Sorry if my questions sound stupid :)

guix: Ok thanks, can I do something else, like for example, wire the SQW pin (set to 1Hz), to a relay's low level input, to turn on/off a light every seconds, without the need of the Arduino? Can it be used as an alternative to a timer such as the 555 timer chip? Sorry if my questions sound stupid :)

That would not work, but only because the SQW pin cannot supply sufficient current to operate a relay. Add a transistor to boost the current and a power supply capable of providing sufficient current, and it would work. The typical coin cell used with an RTC should only be counted upon to provide backup power for the RTC; coin cells have very low capacities and shouldn't be expected to drive a relay.