Hallo everyone
I can't get my DS3231SN RTC to work. It just seems as if someone pressed the pause button ???
The RTC Module is directly connected via jumper wire to my UNO, no other hardware connected, Backup Battery provides 4,4V, which should be more than enough.
VCC------5V
GND-----GND
SCL------A5
SDA-----A4
I have tried different libraries, none of them could solve my problem.
This is the code I used to set the time on it:
#include <DS3231.h>
DS3231 rtc(SDA, SCL);
void setup()
{
Serial.begin(115200);
rtc.begin();
rtc.setDOW(WEDNESDAY);
rtc.setTime(12, 0, 0);
rtc.setDate(1, 1, 2014);
}
void loop()
{
}
And this is my code for reading from the RTC:
#include <DS3231.h>
DS3231 rtc(SDA, SCL);
void setup()
{
Serial.begin(115200);
rtc.begin();
}
void loop()
{
Serial.print(rtc.getDOWStr());
Serial.print(" ");
Serial.print(rtc.getDateStr());
Serial.print(" -- ");
Serial.println(rtc.getTimeStr());
delay (1000);
}
And here is the result:
Wednesday 01.01.2014 -- 12:00:00
Wednesday 01.01.2014 -- 12:00:00
Wednesday 01.01.2014 -- 12:00:00
Wednesday 01.01.2014 -- 12:00:00
Wednesday 01.01.2014 -- 12:00:00
And so on...
BUT: After some minutes, the time changed a little bit and then stopped again:
Wednesday 01.01.2014 -- 12:00:00
Wednesday 01.01.2014 -- 12:00:00
Wednesday 01.01.2014 -- 12:00:00
Wednesday 01.01.2014 -- 12:00:00
Wednesday 01.01.2014 -- 12:00:01
Wednesday 01.01.2014 -- 12:00:01
Wednesday 01.01.2014 -- 12:00:01
Wednesday 01.01.2014 -- 12:00:01
Wednesday 01.01.2014 -- 12:00:01
Wednesday 01.01.2014 -- 12:00:01
Wednesday 01.01.2014 -- 12:00:01
Wednesday 01.01.2014 -- 12:00:01
Wednesday 01.01.2014 -- 12:00:01
Wednesday 01.01.2014 -- 12:00:01
Wednesday 01.01.2014 -- 12:00:01
Wednesday 01.01.2014 -- 12:00:01
Wednesday 01.01.2014 -- 12:00:01
Wednesday 01.01.2014 -- 12:00:01
Wednesday 01.01.2014 -- 12:00:01
Wednesday 01.01.2014 -- 12:00:01
Wednesday 01.01.2014 -- 12:00:01
Wednesday 01.01.2014 -- 12:00:01
Wednesday 01.01.2014 -- 12:00:01
Wednesday 01.01.2014 -- 12:00:01
Wednesday 01.01.2014 -- 12:00:01
Wednesday 01.01.2014 -- 12:00:01
Wednesday 01.01.2014 -- 12:00:01
Wednesday 01.01.2014 -- 12:00:01
Wednesday 01.01.2014 -- 12:00:02
Wednesday 01.01.2014 -- 12:00:02
Wednesday 01.01.2014 -- 12:00:02
Wednesday 01.01.2014 -- 12:00:02
Wednesday 01.01.2014 -- 12:00:02
Wednesday 01.01.2014 -- 12:00:02
Wednesday 01.01.2014 -- 12:00:03
Wednesday 01.01.2014 -- 12:00:03
Wednesday 01.01.2014 -- 12:00:03
Wednesday 01.01.2014 -- 12:00:04
Wednesday 01.01.2014 -- 12:00:04
Wednesday 01.01.2014 -- 12:00:04
Wednesday 01.01.2014 -- 12:00:04
Wednesday 01.01.2014 -- 12:00:04
Wednesday 01.01.2014 -- 12:00:04
Wednesday 01.01.2014 -- 12:00:04
Wednesday 01.01.2014 -- 12:00:04
Is it even possible to stop the RTC? Is my code or wiring wrong, or is the RTC just defective?
lg, couka