"inaccurate timing"

Thread Starter

folorunsoa

Joined Aug 11, 2014
3
Thank you, Bob for your prompt response. For your additional info, I used 8Mhz. crystal with two 22pf capacitors connected to pins 13 & 14 of the PIC18F4550 Microcontroller. Therefore, I expected a better accuracy than what I am getting presently. I have a strong feeling that something is wrong with my setup timer code. So, I need an assistance from any forum member in order to remove the timer inaccuracy or reduce it to the bearest minimum.

Thank you.
folorunsoa
 

MrChips

Joined Oct 2, 2009
30,712
Just to give you an idea of the kind of accuracy to expect, I am working on my clock project using a TI MSP430G2553 driven with a 32768Hz crystal. At the moment I am calibrating the real-time clock timer and able to achieve accuracy to better than 1 sec in 10 days.

A crystal oscillator can be accurate to better than 1 part in 1,000,000.

During my initial testing I observed accuracy of 1 part in 500. This lead me to my error that I was incorrectly setting my timer to overflow at 512 counts instead of 511.
 
Last edited:

THE_RB

Joined Feb 11, 2008
5,438
...
A crystal oscillator can be accurate to better than 1 part in 1,000,000.
...
I test a lot of xtals. Normal xtals like from hobby suppliers (like 8, 10, 16 MHz etc) are generally only accurate within about a +/- 40 PPM range.

The 32768 Hz tiny watch xtals are better, generally +/- 10 PPM range with most better than 5 PPM.

I recently tested the DS3231 RTC IC which showed better than 0.4 PPM out of the box, quickly tuned to 0.1 PPM (but no idea how long that will last).

I'm still thinking of sticking it in a tiny handheld battery powered frequency meter good for accuracy better than 0.5 PPM. A useful tool.

You might be interested in the tests in this recent thread;
http://forum.allaboutcircuits.com/showthread.php?t=99839
:)
 
Top