Clock running fast on PPDB
scurrier
Posts: 32
Hello All,
I'm a new Propellerhead and I am trying to build a clock with the Propeller Professional Development Board. I am using the DS1302 that is provided on the board. Instead of using the board's own 16 segment displays, I wired up some of my own on the breadboard so that I can learn how they work and also as a protection to not break the ones on the board as I am learning.
As far as the time keeping goes, I have studied some code for the DS1302 that SEL wrote and decided to write my own as an educational excercise and to be able to say that I did it. I got it all working last night and left the clock on overnight to see if it kept time well. I noticed before I went to bed that it seemed to be speeding up slightly. When I woke up it had gained 2-3 seconds in about 7 hours. I'm not sure if this is within spec or not but it seems like it wouldn't be because a clock like this would gain 3 or more minutes in a month.
For reference, I was using the clock on my 2008 Dell desktop computer as a reference time piece. Maybe next time I try to measure the clock I should use one of the atomic clocks that are out there on the internet.
I did some investigation on the forums and found this thread:
http://forums.parallax.com/showthread.php?t=123743&highlight=ds1302+fast
...which has some discussion about a fast clock using this chip. Most of the application notes I think wouldn't apply to me because I am assuming that Parallax used them when designing the PPDB. There is one that I am wondering about though. One suggestion was to include a capacitor across the power input to the chip to prevent external circuit noise from entering the time section. I noticed in the PPDB schematic that there is no capacitor across pins 1 (Vdd) and 4 (Gnd) of the DS1302 RTC.
Does anyone have any ideas what I might look at to troubleshoot the fast clock problem? Is the fact that no capacitor is provided on the PPDB a concern? FYI, my PPDB was one of the blemished units that was sold within the past month.
Thanks,
Shaun
I'm a new Propellerhead and I am trying to build a clock with the Propeller Professional Development Board. I am using the DS1302 that is provided on the board. Instead of using the board's own 16 segment displays, I wired up some of my own on the breadboard so that I can learn how they work and also as a protection to not break the ones on the board as I am learning.
As far as the time keeping goes, I have studied some code for the DS1302 that SEL wrote and decided to write my own as an educational excercise and to be able to say that I did it. I got it all working last night and left the clock on overnight to see if it kept time well. I noticed before I went to bed that it seemed to be speeding up slightly. When I woke up it had gained 2-3 seconds in about 7 hours. I'm not sure if this is within spec or not but it seems like it wouldn't be because a clock like this would gain 3 or more minutes in a month.
For reference, I was using the clock on my 2008 Dell desktop computer as a reference time piece. Maybe next time I try to measure the clock I should use one of the atomic clocks that are out there on the internet.
I did some investigation on the forums and found this thread:
http://forums.parallax.com/showthread.php?t=123743&highlight=ds1302+fast
...which has some discussion about a fast clock using this chip. Most of the application notes I think wouldn't apply to me because I am assuming that Parallax used them when designing the PPDB. There is one that I am wondering about though. One suggestion was to include a capacitor across the power input to the chip to prevent external circuit noise from entering the time section. I noticed in the PPDB schematic that there is no capacitor across pins 1 (Vdd) and 4 (Gnd) of the DS1302 RTC.
Does anyone have any ideas what I might look at to troubleshoot the fast clock problem? Is the fact that no capacitor is provided on the PPDB a concern? FYI, my PPDB was one of the blemished units that was sold within the past month.
Thanks,
Shaun
Comments
-Phil
Here are some sites that talk about the accuracy of the DS1302 chip:
http://www.dontronics.com/rtc.html
http://www.electro-tech-online.com/general-electronics-chat/23358-accuracy-required-ds1302-based-clock.html
http://www.edaboard.com/thread4144.html
http://pdf.directindustry.com/pdf/eurotech/vulcan-pc-104-format-533mhz-intel-ixp425-xscale-comms-controller/7026-38242-_23.html
One more question I just thought of. Is the lack of accuracy really due to the selection of a DS1302? Couldn't you get a better crystal and be very accurate (assuming you only need granularity down to the second?) Could somebody riff on the accuracy benefits of a "better" RTC part (not the crystal) for a few sentences?
http://www.maxim-ic.com/view_press_release.cfm/release_id/1101
It should explain some of the benefits that you are asking about.
Stick a couple of 30pF ones on and see if anything changes, and then if successful some calibration might be possible.