This brings up a question that has been bugging me for a while. I have a ds1302 RTC and supposed 20 PPM crystal (32768 hz). It seems to work ok but I'm seeing some fairly odd drift with it. I compare it against my PC clock which I sync up against the atomic clock every day. What I'm seeing is that the two clocks are not off by a constant amount but drift around by as much as 30 seconds + or - in a day. That is to say one day the RTC will be ahead by 20-30 seconds and the next day it will be behind by some amount. The room that its in stays within 5 degrees F and a I haven't gotten physically near (2-3 ft) the circuit in question (I'm using a PIC to send the time via serial I/O). The circuit is in a solderless breadboard so I know there is extra capacitance probably slowing the crystal down. So, I would have though under those circumstances, the RTC would be off by a relatively fixed percentage. Is this just a case of the solderless BB causing problems or is there something else going on? something that I might compensate for? The PCB its going into has ground rings on both sides of the board for the crystal, I've routed signals away from the RTC in general and the crystal in particular and have lots of grounded copper areas. Phil Barrett --- Jinx wrote: > > > datasheet for the 16F87, and it says the > internal oscillator is > > > +- 1% accurate, I think, at 25 degrees C. I > think something > > > must be very wrong for it go get that far out. > > > > Do the calculation - half a second in 2 minutes is > 0.4%, well in > > spec. You'll need to use a crystal to keep > accurate time > > Or use OSCTUNE or adjust your timing block to > compensate > for the 0.4%. Depends on what periods you want to > time. Even > a crystal will not give give accurate long-term > stability unless it's > calibrated and temperature-compensated. 10ppm is ~ > 1s / day > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > Yahoo! Mail Stay connected, organized, and protected. Take the tour: http://tour.mail.yahoo.com/mailtour.html -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist