Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Frequency Counter using PIC16F872

Status
Not open for further replies.

scdoro

Member level 5
Joined
Jan 12, 2005
Messages
87
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,040
frequency counter prescaler

Hi,
I am building a frequency counter that can measure up to 50Mhz using PIC16F872, which has an operating frequency DC of 20Mhz. Would like to know if there are any circuits that I can make reference to? And can this be done using this PIC by using a prescaler of 256 ? thanks
 

frequency counter using pic16f872

A 20MHz, or 5MIPs PIC can detect bit changes of at most 2.5MHz, That gives the ability to detect frquencies of aronud 1MHz, maybe lesser. What is usually done is that we divide the frrequency. There are various ways to do this, including demultiplexers, shmitt triggers, counters and so on.
 

pic16f872 project

hi, is it possible to implement the divider method using software ? or must i really have a hardware cct for the divider using counter etc ? Cuz for the PIC chip, there is inbuilt prescaler to up to 256 for timer0. thanks
 

pic an592

AN592 from Microchip is very close to what you are trying to do.

ww1.microchip.com/downloads/en/AppNotes/00592d.pdf
 

16f872 frequency counter

scdoro said:
hi, is it possible to implement the divider method using software ? or must i really have a hardware cct for the divider using counter etc ? Cuz for the PIC chip, there is inbuilt prescaler to up to 256 for timer0. thanks
As I mentioned, a 5MIPs PIC by itself can at most detect up to a 1MHz signal. In other words, it's too slow. Even 1MHz is a very optimistic estimate.
That's the reason why we use hardware circuits to implement the frequency divider. You must realise that microprocessors in general are considered very slow creatures in relative terms.
 

schematics frequency pic16f872

Hi checkmate,

Actually, the micro is not used to sample the actual input signal. Rather, the counter (a hardware device) counts the pulses. The counter and the prescaler can count pulses with a frequency of up to 50MHz. The micro "per se" only does the gating. Then it reads 16 bits out of the counter and prescaler (using a little SW trick), but his operation is now done "off-line". It can take any amount of time.
Please read the Microchip's appnote AN592.
 

frequency counter with pic

Hi,

You can check in these topics





I hope this can help
 

1mhz frequency counter using pic

I once made a device using 16F872 that was actually an RF power meter,but also could measure frequency.It used 2-line LCD for display.
I was really surprised that it could measure frequencies as high as 80 MHz!
If you want,I can send you the circuit and the source of the program.
You can get rid of the power-metering stuff and leave only what you need.
Send me a PM if you need more help.
 

dl4yhf frequency meter

batdin said:
I once made a device using 16F872 that was actually an RF power meter,but also could measure frequency.It used 2-line LCD for display.
I was really surprised that it could measure frequencies as high as 80 MHz!
If you want,I can send you the circuit and the source of the program.
You can get rid of the power-metering stuff and leave only what you need.
Send me a PM if you need more help.

Send me pls the sources and the circuit!

bant(a)pi.ccl.ru
 

circuito pic 16f872

Hi,
since there were some people interested in my project,
and since I misplaced its circuit,I opened the bloody thing and tried to draw a presentable circuit.
I double-checked it,so I hope it's correct.
In the file I send there is also an info about how to make it work only as a counter.
The file mw.hex works fine.The file counter.hex I haven't tested,but I think it should work,too.
If you have some more questions,send me a PM.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top