Need to learn how making frequency counter (or any time critical project) using PIC18F that display output over USB.
Having choice of 3 clock sources:
-
±50ppm 4.0000 MHZ crystal ATP040SM
4.0000 MHZ 20PF SMD ±50ppm
http://www.ctscorp.com/components/Datasheets/008-0325-0_A.pdf
-
±50 ppm 24.0MHZ external oscillator
XO-54D-24.0MHZ
±50 ppm
-
±100 ppm 40.0MHZ external oscillator
MXO45-40M000 Manufacturer: CTS CORP
40 Mhz
±100 ppm
http://engineering.dartmouth.edu/courses/engs031/databook/oscillator.pdf
To run internal PLL PIC18F will divide clock input by PLLDIV that can be setting to either 1, 6 or 10 for above options respectively.
I thinking which option providing best stability?
When thinking myself, I feel 3rd option will be best as I reasoning that ±100 ppm 40Mhz clock will be divide by 10 and hence effectively behaving like ±10 ppm 4Mhz clock?
Or is reasoning wrong and ±100 ppm 40Mhz clock after divide by 10 is effectively still ±100 ppm 4Mhz clock?
If you, experienced designing having choice of above 3 – which one you choose and why (no consider PCB space or 5V voltage issue in 3.3v world, but might consider cost only between more expensive ±50 ppm vs less expensive ±100 ppm)
Best Answer
You are interested in the relative error and/or stability, which is unaffected by any division. So, other things being equal, take the lowest ppm clock source for the best accuracy.
If 50 ppm is enough for you, I would choose the crystal for board space and price.
For better accuracy you could consider a better quality (tuned) crystal oscillator. Same physical format as a regular oscillator (14-pin DIP size), but higher price (~ $20).