Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
Do anyone have a workin diagram of a PIC16f84 frequency counter with a ranging from .1Hz to a max of at least 300MHz. and hopefully it comes with its assembly program. Ideas, partial diagrams are also welcome. :wink:
A pic16f84 runs at a maximum speed of 20Mhz. So you'll never be able to measure up to 300Mhz directly (Pic's can be overclocked, but not that much). Also remember that the pic will need several instructions to detect a single hi-to-low or low-to-hi transmission. So you'll need a microcontroller that runs at a speed much greater then 300Mhz. I don't think micro's are available that fast yet ...
you're going to need normal circuitery for this one, without a micro, Or at least some circuit wich can handle the speed and then send the results to the micro for processing
Yes it's a good circuit (I've built one!), it's based on an old MicroChip application note - but with an LCD replacing the 7 segment LED displays.
To make it go higher, simply add a prescaler to the front end - high frequency divide by ten pre-scaler chips used to be commonly available, I don't know if they still are? - used to be made by Plessey (although I'm not sure of the spelling).
The original design doesn't go as low as you wanted either, but you could easily extend it - it simply measures the pulse width of the incoming signal (it's far faster than actually counting the number of pulses for low frequencies).
There are couple of free frequncy counter designs and weeder
is one of them. PIC can count signals which are faster than it's
own clock because of built-in prescaler. If you want to count
even faster signals (over 50MHz or whatever limit your counter has)
simply add prescaller. That's just another divider stage. If you select
divide by ten (decade counter) you get 10x the range or in this
case 50MHz*10=500MHz max. for example.
If you cascade two of them you get 100x range etc.
Since decade counters are not quite common for this frequency range
lot's of people uses other solutions. Just google "prescaler" or check
this out: https://www.qsl.net/n9zia/pre/
They post schematic only in lousy postscript format. To save you from
big download and installation of ghostscript I'm attaching schematic
as GIF graphic.
Measuring slow signals is different. One approach is to use PLL
chip and multiply input signal 10, 100 or even 1000 times
so you get the direct readout on regular counter. Problem is that
not everyone likes to fiddle with PLL and this is usually good only in
fairly narrow range (good to measure AC line frequency).
Other method is use own signal (crystal oscilator of known frequency)
and count it's pulses but use slow changing signal to control gate.
This gives you value which is proportional to period (T) of measured
signal. To get the frequency just calculate: