Mr RB
Well-Known Member
Hi, I was digging through a junk box and found some large (double scale) 1x16 backlit text LCD displays I bought a while back.
I was thinking of using a PIC 16F or 18F and making a high-accuracy frequency meter. Here's some thoughts;
1. make a precision 5v supply
2. use my zero-error 1 second PIC code that can use a "long" constant for 1 second period
3. sample frequency over 1 second
4. home made xtal oven keeps xtal at 45'C (i've already got this)
5. PIC self-calibrates its xtal constant
The idea is that the xtal oven keeps the xtal at a constant output frequency. Then my 1 second code uses a long constant (like 20.0000000002316 MHz) to generate an exact second period.
The long constant is determined by the PIC by testing against a known standard, like say 24 hours testing against the mains frequency, or maybe 24 hours testing against a serial GPS etc.
If I use the PIC TMR1 asynchronous counter mode it is good for about 60nS period (from the datasheet) so that is about 15MHz max frequency that it would be able to measure. Then use averaging and zero-error rounding so the freq measurement gets very accurate over longer number of seconds test period.
This new frequency meter would be to replace my ageing frequency meters which are just xtal standard. I would also like to be able to "sniff" PIC clock xtals and see the xtal speed exactly, where my freq meters now are only 7 digits and not very good for that.
I know a very high accuract freq meter is an ambitious project but I've already got many of the hardware and software issues solved... Any thoughts?
I was thinking of using a PIC 16F or 18F and making a high-accuracy frequency meter. Here's some thoughts;
1. make a precision 5v supply
2. use my zero-error 1 second PIC code that can use a "long" constant for 1 second period
3. sample frequency over 1 second
4. home made xtal oven keeps xtal at 45'C (i've already got this)
5. PIC self-calibrates its xtal constant
The idea is that the xtal oven keeps the xtal at a constant output frequency. Then my 1 second code uses a long constant (like 20.0000000002316 MHz) to generate an exact second period.
The long constant is determined by the PIC by testing against a known standard, like say 24 hours testing against the mains frequency, or maybe 24 hours testing against a serial GPS etc.
If I use the PIC TMR1 asynchronous counter mode it is good for about 60nS period (from the datasheet) so that is about 15MHz max frequency that it would be able to measure. Then use averaging and zero-error rounding so the freq measurement gets very accurate over longer number of seconds test period.
This new frequency meter would be to replace my ageing frequency meters which are just xtal standard. I would also like to be able to "sniff" PIC clock xtals and see the xtal speed exactly, where my freq meters now are only 7 digits and not very good for that.
I know a very high accuract freq meter is an ambitious project but I've already got many of the hardware and software issues solved... Any thoughts?