Shop OBEX P1 Docs P2 Docs Learn Events
Why is my RTC loosing time? — Parallax Forums

Why is my RTC loosing time?

MicrocontrolledMicrocontrolled Posts: 2,461
edited 2010-12-10 13:24 in General Discussion
I have a DS1302 RTC (Real Time Clock) with the proper Xtal and low noise connections. However, it has lost ~20 seconds since I set it last night. It has been running off the backup battery overnight. I know that it looses some time, but not this much! The parts I am using are here:
http://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&productId=176778&catalogId=10001&freeText=176778&app.products.maxperpage=15&storeId=10001&search_type=jamecoall&ddkey=http:StoreCatalogDrillDownView

And here:
http://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&productId=325244&catalogId=10001&freeText=325244&app.products.maxperpage=15&storeId=10001&search_type=all&ddkey=http:StoreCatalogDrillDownView

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-12-09 12:37
    According to its datasheet, the DS1302 is designed for a 6pF crystal. The crystal you're using is spec'd at 12.5pF. That might make a difference. Also, what's the temperature environment surrounding your RTC? That can make a difference, too.

    -Phil
  • ercoerco Posts: 20,261
    edited 2010-12-09 15:07
    Time definitely goes by faster as you get older...
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2010-12-10 13:24
    This work real well keep time
    DS32kHz 32.768kHz Temperature-Compensated Crystal Oscillator
    Tis very inportant follow what it has here


    Figure 6
    shows one circuit that
    can be used to reduce the current consumption of a DS32kHz and an RTC. The values of R1 and C1 may vary
    depending on the RTC used. However, values of 1.0M



    Ω and 100pF are recommended as a starting point. R2 is
    used to shift the input waveform to the proper level. The recommended value for R2 is 33kΩ.
    I had adj the value of R2 a little bit for it to keep the time right on the mark


    I hope this helps
Sign In or Register to comment.