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.

What the is the maximum frequency a PIC ??

Status
Not open for further replies.

semmoor

Newbie level 4
Newbie level 4
Joined
Jan 31, 2012
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,313
What the is the maximum frequency a PIC microcontroller can read when running at 20Mhz crystal?

I'm trying the build a frequency meter but don't even know how to know the max frequency can be read by a microcontroller ?!
 

Hello!

What do you mean by what frequency can be read?
If you use a timer, then you cannot trigger the timer in less than 1 clock period.
So if you use a microcontroller only, then you are stuck to its frequency.
But there are some tricks: you can use a very high speed external counter
(I did it earlier with 74xxx chips), and there are certainly other faster solutions.
Then the role of the µC would simply be to read the value, and in this case it does
not depend on the µC frequency.

Dora.
 

Thanks Dora,

I'm actually trying to design a frequency counter using pic16f877a and i used a 16mhz crystal and was able to read frequency from timer0 but it just read up to 255 because the timer0 is an 8bit long.

simply my question was >> is there any method to know the max frequency any microcontroller can read??

for example in Atmega32 if it runs at 16mhz it you divide 16/4 = 4 so 4mhz is the max frequency that can be read by Atmega32 when using a 16mhz crystal.

but how can that be understood if i'm using a pic microcontroller running at 20mhz?? is there any formula !!??

thanks again.

- - - Updated - - -
 

Hello again!

There are many tricks to measure more accurately than your CPU allows.
By the way, your signal is a square wave? If not, you have to make a square wave from it.
Then if you want to measure, for example, a frequency around 100 MHz, then you can use a divider
(which is a plain counter). If you divide with a 24-bit counter, then you will have one pulse
every 2^24 clocks, therefore about 6 pulses per second for 100 MHz. You can therefore measure
with a decent accuracy although it's far beyond the CPU capability.

Dora.
 
A 8 bit pic at 20 MHZ has a 5 Mhz clock.
However if you google "50mhz frequency counter pic" you will find several counters at 50 MHZ
They do this by feeding signal as an external pulse to the timer0 counter which has a 50MHZ limit. Read the articles for full theory .

George
 

PIC32 goes up to 80MHz.

But always you can use external ADC IC for higher sampling speed, then uC supports.
 

Agreed with george2000 and don't forget it's the gating time you have to generate, not the counting time. Most 16F877a will count at 50MHz or more.

Brian.
 

Definitely some kind of buffering is needed and external ADC ICs. On similar way sound card can be used as scope for MHz ranges.
 

Why is an ADC needed to measure frequency? All the OP has to do is provide a gating period in software then drive the frequency into the counter input on the PIC.

Brian.
 
  • Like
Reactions: tpetar

    tpetar

    Points: 2
    Helpful Answer Positive Rating
Hello again!

There are many tricks to measure more accurately than your CPU allows.
By the way, your signal is a square wave? If not, you have to make a square wave from it.
Then if you want to measure, for example, a frequency around 100 MHz, then you can use a divider
(which is a plain counter). If you divide with a 24-bit counter, then you will have one pulse
every 2^24 clocks, therefore about 6 pulses per second for 100 MHz. You can therefore measure
with a decent accuracy although it's far beyond the CPU capability.

Dora.


thank you it was really helpful i appreciate that.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top