I have a 10Mhz Rubidium Frequency Standard. I'm thinking of building a 100Mhz PIC-based frequency counter using that as the time base. Should I use the 10Mhz as the PIC oscillator (assuming a 20MHz PIC)?
What is the best way of generating counting periods of 0.01, 0.1, 1, and 10 seconds? (some combination of Timer 0, 2 and software?)
I will use an external modulo 256 high-speed counter to prescale the 100 MHz so that the highest frequency counted directly by the PIC will be 390KHz. That requires using a CCP (Timer 1) module and software to accumulate the counts?
The idea would be to gate the prescaler with the PIC derived counting period, and then be able to read the prescaler counter value into a port so that it can be concatenated with the count accumulated inside the PIC. The result would get converted to decimal and displayed on an LCD as Hz.
If a port pin is set high and then low for the duration of the counting period, will that produce a sufficiently accurate gating of the signal being counted? (different delay of the port pin going high compared to going low?) Or should I use an external high-speed toggle flip-flop so that the external gating period could be the time between two successive up-edges?
Anybody have any other suggestions.
What is the best way of generating counting periods of 0.01, 0.1, 1, and 10 seconds? (some combination of Timer 0, 2 and software?)
I will use an external modulo 256 high-speed counter to prescale the 100 MHz so that the highest frequency counted directly by the PIC will be 390KHz. That requires using a CCP (Timer 1) module and software to accumulate the counts?
The idea would be to gate the prescaler with the PIC derived counting period, and then be able to read the prescaler counter value into a port so that it can be concatenated with the count accumulated inside the PIC. The result would get converted to decimal and displayed on an LCD as Hz.
If a port pin is set high and then low for the duration of the counting period, will that produce a sufficiently accurate gating of the signal being counted? (different delay of the port pin going high compared to going low?) Or should I use an external high-speed toggle flip-flop so that the external gating period could be the time between two successive up-edges?
Anybody have any other suggestions.