Shop OBEX P1 Docs P2 Docs Learn Events
DS 1302 runs fast... — Parallax Forums

DS 1302 runs fast...

denodeno Posts: 242
edited 2008-02-21 19:02 in General Discussion
I have a couple of different devices that use the DS 1302 Time chip.· Both devices will gain time.· About 5 minutes in a 3 week period.· I know, not much, but enough to require resetting the clock.· I am using the recommended crystal, etc.·

Has anyone experenced this problem with the DS 1302?

Other then that, the operation is normal.

Deno

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-02-16 15:06
    This is about 0.01% error which is normal for a crystal controlled real time clock. If you want better accuracy, you will need to use some kind of adjustment and calibrate the actual crystal frequency against a frequency standard. You will also need some kind of temperature compensation. You can buy crystal oscillators that are temperature compensated and already trimmed to a better accuracy. These do take a lot more power than a DS1302, but that's the price for accuracy.
  • MikeKMikeK Posts: 118
    edited 2008-02-18 22:01
    Have you followed good wiring practices? The DS1307 datasheet has a blurb about preferred methods for mounting the crystals. They need to be as close to the DS1307/2 as possible, and away from any other signal carrying wires (noise coupled into the crystal can cause the clock to run fast). The section is called "Clock Accuracy". Good decoupling of the power supply couldn't hurt either.

    I've got two clocks running off DS1307s, and they keep time to around 1-2 minutes per month fast. They're in the basement, so the temperature is fairly constant, around 68-69 degF.

    Mike
  • denodeno Posts: 242
    edited 2008-02-19 23:00
    Yes, I have read that info and I do have the crystal mounted right next to the IC itself.· Couldn't get it any closer unless I soldered it directly to the IC pins before I insert the IC in the socket.· Every thing is decoupled.· I'll just live it it...but thanks to both of you for your replys.

    Deno
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-02-21 18:32
    Deno,

    I have noticed that in several projects I have the DS1302 in there is a minimal gin of time per month, however if the main power should go out, that gain jumps. For example, one day the power was out for several hours. When it came back on the clock was about 3 minutes fast. I have considered trying one of the more accurate clock chips from Maxim/Dallas, but they’re SMD. So far I’ve just accepted it. But for someone who has used the DS1302 in countless projects I too have seen some gain in time and I also have followed the AppNote regarding crystal placement/layout. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • denodeno Posts: 242
    edited 2008-02-21 19:02
    Chris....Thank you for the reply.· At least we won't be late....

    Deno
Sign In or Register to comment.