Data Logger RTC Problem - ds1037 Time Not Updating

by stwagstaff on Thu May 26, 2011 11:16 am

I have a newly-built Data Logger shield. I have the same problem on both a Duemilanove ATMEGA328 and an UNO. The SD card functions seem to be working fine, but when I run the ds1037 example sketch for the RTC, it doesn't work properly: The clock sets, but doesn't increment forward. It just stays stuck at the same time. However, with the softrtc sketch, it seems to work. I don't understand why the ds1037 one doesn't work. Is it a soldering/hardware problem?

I'm a newbie to this. What is the difference between
"RTC_DS1307 RTC;" and "RTC_Millis RTC;"?

ds1037 serial output:

*********************************
2011/5/25 8:14:56
since midnight 1/1/1970 = 1306311296s = 15119d
now + 7d + 30s: 2011/6/1 8:15:26

2011/5/25 8:14:56
since midnight 1/1/1970 = 1306311296s = 15119d
now + 7d + 30s: 2011/6/1 8:15:26

2011/5/25 8:14:56
since midnight 1/1/1970 = 1306311296s = 15119d
now + 7d + 30s: 2011/6/1 8:15:26
*********************************

softrtc serial output:

*********************************
2011/5/25 9:8:25
seconds since 1970: 1306314505
now + 7d + 30s: 2011/6/1 9:8:55

2011/5/25 9:8:28
seconds since 1970: 1306314508
now + 7d + 30s: 2011/6/1 9:8:58

2011/5/25 9:8:31
seconds since 1970: 1306314511
now + 7d + 30s: 2011/6/1 9:9:1

*********************************
stwagstaff
 
Posts: 3
Joined: Thu May 26, 2011 10:35 am

Re: Data Logger RTC Problem - ds1037 Time Not Updating

by adafruit on Thu May 26, 2011 12:25 pm

check that you are powering the RTC properly. improper power and not setting the 'run' bit (we do it when we set the time) can cause this issue
User avatar
adafruit
 
Posts: 11505
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: Data Logger RTC Problem - ds1037 Time Not Updating

by stwagstaff on Thu May 26, 2011 4:43 pm

Eh, hem. Embarrassing moment. Turns out I neglected to solder in the crystal. Details, details...
Thanks for the help.
stwagstaff
 
Posts: 3
Joined: Thu May 26, 2011 10:35 am

Re: Data Logger RTC Problem - ds1037 Time Not Updating

by stwagstaff on Fri May 27, 2011 3:19 pm

Just to confirm. Crystal not soldered = no time updates. However, board seems to act normally, otherwise. Crystal in place = happy RTC.
stwagstaff
 
Posts: 3
Joined: Thu May 26, 2011 10:35 am