DS3231 RTC help

I have a DS3231 AT24C32 IIC RTC that I ordered on Ebay.

http://www.ebay.com/itm/DS3231-AT24C32-IIC-module-precision-Real-time-clock-module-memory-module-Arduino-/400503978923

It will be used to correct timing errors for my arduino mega 2560 running a telescope pointing sketch designed to receive that input. The example sketches I can find are all about setting and displaying time, which I do not need to do.

All I want to do with it is program the square wave output to 1 pulse per second. My physical connection is to the mega, with sda to 20 and scl to 21.

so my questions are: 1. am I hooked up correctly to program, and 1. What code to I need to program the 1 PPS square wave?

Thanks!
Grant

#include <DS3232RTC.h>             //http://github.com/JChristensen/DS3232RTC
//... 
 RTC.squareWave(SQWAVE_1_HZ);

By the way, unless you use an LIR2032 which is the rechargable type battery, you should disable the charging circuit by removing the onboard charging resistor or diode.

Thank you! That should just about do it.

Odd, it came with a battery but not a rechargeable one. I’ll look for that resistor.

-Grant

gmussman:
Thank you! That should just about do it.

Odd, it came with a battery but not a rechargeable one. I'll look for that resistor.

-Grant

R5 - 200 ohms