DS3234 RTC Question

Hi...I am using the Sparkfun DS3234 RTC library and have a question. Previous to this, I had a DS3231 RTC which is similar but uses an I2C interface where the Ds3234 uses SPI. For the DS3231 when setting a hardware interrupt to trigger on the SQW Pin you had to use the following command:
rtcDS3231.writeSqwPinMode(DS3231_OFF); to stop oscillating signals from causing the alarm to fail. The examples for the DS3234 do not use this but they do include the command:
/

/ (Optional: enable SQW pin as an interrupt)
  rtc.enableAlarmInterrupt();

I also noticed in the code for the library the following:

// writeSQW -- Set the SQW pin high, low, or to one of the square wave frequencies
void DS3234::writeSQW(sqw_rate value)

My question is if using this pin (set to high and active low). Do I need to call both
rtc.enableAlarmInterrupt();
and
rtc.writeSQW(1);

??? If so, I guess they just forgot in the example?

I don’t have this chip so I don’t know . The way I would approach this is

First you try the example. Does it work?
If it does not work you test your idea.

Then you go check the data sheet to see what’s required and look at the code in the library to see if they took that into account.

You should be able to turn off the square wave output once at the beginning of your code. So maybe it does that. Or, the library may automatically turn it off when intializing.

Sparkfun has a forum specifically devoed to their products.
Have you tried there?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.