DS3231 TIme not increasing

Hi,
I am working with DS3231 with arduino UNO.
i use MD_DS3231_Test example which is attached hear with.
As per example i have set Year,Month,Date,Time,Day of week.
all data are transferred on RTC chip.
but surprisingly time is not increasing as shown in attached screen shot.

Kindly suggest what to do. :o :o :o

MD_DS3231_Test.ino (16.2 KB)

ashish_8284:
Hi,
I am working with DS3231 with arduino UNO.
i use MD_DS3231_Test example which is attached hear with.
As per example i have set Year,Month,Date,Time,Day of week.
all data are transferred on RTC chip.
but surprisingly time is not increasing as shown in attached screen shot.

The DS3231 has a status control register and the contents of this register decides whether the clock is running or stopped.

Libraries for the DS1307 generally do not touch this DS3231 register
Some libraries for the DS231 set the clock to running on initialization by default, some don’t.

Which RTC library are you using, if any?

What command are you entering in the serial monitor to get it to print out the date and time ? "TR" ?
Maybe try "S" to check the status of the RTC.

Check the status and make sure the halt bit is not in halt mode. This is the default for a new module. You can un-halt from the serial monitor.

Hi Marco,
I checked halt bit which was low.
As I face this problem I tried to make halt bit high and low but no improvement observed.

I also run I2C scanner to cross check I2C address of RTC & I found two address "57" & "68". I think 68 is for RTC & 57 for EPROM which is on my RTC PCB. Is EPROM making any difference ????.

ashish_8284:
Is EPROM making any difference ????.

No

Just put away the program for a while. Find a popular DS3231 library and load one of the example sketches. It's the only way to know for sure whether you have a software or hardware problem.

Find a popular DS3231 library and load one of the example sketches

That exactly what OP has done. The software he is using is an example from my library that has been downloaded thousands of times. I am confident that the code works fine if it has not been modified.

I tried to make halt bit high and low but no improvement observed.

Can you confirm that the halt bit actually changed status (requesting the device status again)? This is normally the only reason that the clock is not running.

The other question for you is what is the tie being read from the clock if you run the test program without setting the time first (POWER down the Arduino, power up and just read the clock.

Also, can you tell us what your wiring connections are?

marco_c:
That exactly what OP has done. The software he is using is an example from my library that has been downloaded thousands of times.

It would be helpful to place a comment line or two at the beginning to identify it, as it gets shuffled around the internet.

It would be helpful to place a comment line or two at the beginning to identify it, as it gets shuffled around the internet.

Thanks for the tip.

marco_c:
That exactly what OP has done. The software he is using is an example from my library that has been downloaded thousands of times. I am confident that the code works fine if it has not been modified.
Can you confirm that the halt bit actually changed status (requesting the device status again)? This is normally the only reason that the clock is not running.

The other question for you is what is the tie being read from the clock if you run the test program without setting the time first (POWER down the Arduino, power up and just read the clock.

Also, can you tell us what your wiring connections are?

Status of RTC using MD_DS3231_Test example is attached herewith.

i also check RTC time without setting new time in it and it shows “Time - 2000-01-01 00:00:00 Sun”

The datasheet for the device states that the halt bit is ignored when the device is not powered from the battery. In other words, the /EOSC (active low = enabled when 0) has no bearing on whether the clock runs or not the way you have it configured.

I have confirmed this behavior with my own clock module and the same test code, so the config you show in the screen capture should be working.

You need to check your wiring (correctly plugged in SDA/SCL for your Arduino) and your wires (no broken, connectors on properly, etc).

Try a different RTC module. You might have an IC with a failed crystal due to G shock.

Thanks all for guidance.
I have purchased new RTC3131 & waiting for delivery.
I think Crystal of RTC not working as aarg said.
I will take trial with New RTC and replay if any problems faced.

Thanks all for suggestions and guidance.