- DS1302 Clock is losing time.
Mrdavidjenkins
Posts: 49
I am using the DS1302 chip with a battery backup to keep time with a basic sx.· ·Just finished the project last night and ·unplugged the power to the basic stamp.· This morning, the time was off by 20 minutes - that is, the 1302 read 1:30 PM when the time was actually 1:50 pm.· I am using a CR2025 3 volt button type battery.· The backup is only a backup for when the unit needs servicing.
I will leave the basic stamp on AC power tonite to see if there is a problem only with the backup , but I have a couple of questions.
1)· Is there a way to tweak the 1302 to get better times?
2)··Has anyone else seen this kind of problem and how did they resolve it?·
Thanks
Dave
I will leave the basic stamp on AC power tonite to see if there is a problem only with the backup , but I have a couple of questions.
1)· Is there a way to tweak the 1302 to get better times?
2)··Has anyone else seen this kind of problem and how did they resolve it?·
Thanks
Dave
Comments
Dave
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dave Andreae
Tech Support
dandreae@parallax.com
Http://www.parallax.com
·
·· I have several clocks using the DS1302 and each has been left overnight and sometimes a couple of days with just the battery backup on the DS1302.· None of them were ever off by more than a second.· Just curious, which pin are you connecting the battery to, and is it connected to anything else?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Here are the pins
0 Data IO
1 Clock
2 Chip Select
3 LCD for Seetron lcd
Thanks.
Dave
·· What I meant was, which pin is the backup battery connected to, and is it connected to anything else?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Okay - I looked and verified
Pin 1 5volt
Pin 2 crystal 1
Pin 3 crystal 2
Pin 4 grnd
Pin 5 basic pin2
Pin 6 basic pin0
Pin 7 basic pin1
Pin 8 3 volt battery
Do you think I might have the pins reversed. Here is a snipit of the code.
DataIO PIN 0 ' DS1302.6
Clock PIN 1 ' DS1302.7
CS1302 PIN 2 ' DS1302.5
Thanks again for your help. My guess is that the crystal might be off or damaged by my ham - handed soldering. Either that or the crystal sees heat from the clock. I will try another 1302 and crystal tomorrow if the time results warrent.
·· Your connections are correct.· I don't know what's going on.· I've never had those problems.
EDIT:· I checked on the crystal, and if you are using the crystal we sell, then it has to be something else...Is the battery at 3V?· What about your code?· Are you turning on the trickle charger or anything like that?· Are you using the write-protect when you're not updating the time?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Post Edited (Chris Savage (Parallax)) : 8/2/2005 10:07:00 PM GMT
My 2 cents worth...
Deno
PS...the super cap does charge up close to 5 volts.
Dave