The way I've been measuring is to measure the time - let it run for 8 hours, and compare it to a better standard. I use my PC's clock, since I use NTP to sync the clock to the atomic standard, so the PC clock is accurate over the course of several hours. I don't have access to a freq counter, unfortunately. I could try using the PIC's clock (20 MHz xtal) to measure the period of the watch xtal, but I don't know how accurate that is either! Unfortunately, the osc is running slow, so a trimmer will make things worse, not better. I can try making the caps in the osc circuit smaller and see what happens there. Making one adjustment every 8 hours is a slow way to do things. Maybe I should just compensate in the code. Just add 1 second every once in a while. Sort of a software trimmer capacitor. That's how I handle analog calibration - rather than trim the gain of an op amp, I just use a precision resistor as close as I can get, and calibrate and compensate in the code. Larry At 01:39 PM 12/17/2002 +0000, you wrote: >These xtals often need tuning by tweaking the capacitance. >remember also that they are designed to run over a fairly narrow temp >range (i.e. strapped to people) and accuracy will fall off outside >that range. >All the watch modules I've ever taken apart have had a trimmer. >Obviously you can't trim by measuring the xtal freq as the measuring >probe will change the capacitance - you need to generate a signal from >the PIC to measure, but remember that you will get jitter from the >PIC's main clock sampling the 32K xtal, so you need to measure over a >reasonably long period - probably several seconds at least.. > >On Tue, 17 Dec 2002 08:17:47 -0500, you wrote: > > >Any idea what sort of accuracy I should get from a cheap watch xtal in a > >PIC oscillator? > > > >I'm using one as the T1 osc on a '877. I let the timer free-run (I don't > >preset it - it rolls over in 2 seconds), and have an interrupt routine that > >keeps track of time-of-day. When I compare the time of day from this with > >the actual time, the PIC has lost about 6 seconds in 8 hours. Not very good. > > > >Larry > > > >Larry Bradley > >Orleans (Ottawa), Ontario, CANADA > >-- >http://www.piclist.com hint: To leave the PICList >mailto:piclist-unsubscribe-request@mitvma.mit.edu Larry Bradley Orleans (Ottawa), Ontario, CANADA -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu