Max Input Frequency

Thread Starter

olvine

Joined Mar 10, 2014
99
okay thanks.

And what if i want to measure the frequency which is more than the maximum frequency then what method should be used instead of using ADC.
 

alfacliff

Joined Dec 13, 2013
2,458
if you need to count a higher frequency than the input will count, use a prescaler. such as a shotkey series devide by 10 counter. if you need more, there are lots of prescaler (frequency deviders) chips and circuits.
 

t06afre

Joined May 11, 2009
5,934
Hi..

I want to know that what's the maximum frequency we can put to analog input pin in PIC16F887 ?
You have not said anything about what kind of waveform you want to measure nor its expected frequency range. As long as we are not sitting beside at at your workbench. We will not be able to help you in a proper way. Please provide adequate details of your project
 

ericgibbs

Joined Jan 29, 2010
18,841
if you need to count a higher frequency than the input will count, use a prescaler. such as a shotkey series devide by 10 counter. if you need more, there are lots of prescaler (frequency deviders) chips and circuits.
hi alfa,
I think the OP is asking about the ADC input frequency maximum sampling rate.

E
 

Thread Starter

olvine

Joined Mar 10, 2014
99
You have not said anything about what kind of waveform you want to measure nor its expected frequency range. As long as we are not sitting beside at at your workbench. We will not be able to help you in a proper way. Please provide adequate details of your project
If I am talking about analog signal and frequency then it could be any analog signal with some frequency.
But I want to calculate sine wave's frequency using PIC16F887.
 

THE_RB

Joined Feb 11, 2008
5,438
There are a lot of simple "PIC frequency meter" projects you can google.

Most measure up to 50 MHz, which is about the max you can detect with a PIC input pin (usually the TMR1 external clock input pin).

You should provide more details on your needs;
1. What voltage (amplitude) is the sinewave?
2. What frequency range do you want to measure?
3. How much experience do you have writing code for precise timing projects with a PIC?
:)
 

Thread Starter

olvine

Joined Mar 10, 2014
99
Does Timer1 external clock input pin take sine wave ?

sine wave is 4V and the frequency range is the maximum i can get.
Not too much experience but some experience ;)
 

Thread Starter

olvine

Joined Mar 10, 2014
99
And please tell me how can I calculate the amplitude using this controller.

...on high frequencies when ADC miss the samples of sine wave.

Is there any algorithm for that or any method which would be close to actual value ?
 

russ_hensel

Joined Jan 11, 2009
825
A point that may not be clear is that using the ADC to determine frequency is not a great way, for waves of know wave shape using the counter timer is the way to go. This is implicit in several of the answers given so far, but I am not sure it is clear to olvine, but
perhaps it is.
 

shteii01

Joined Feb 19, 2010
4,644
You have a sinusoid with frequency of 10 Hz. You are feeding this sinusoid to ADC. What should be a minimum sampling frequency of ADC? 10*2=20 Hz. So you got to Digikey or Mouser and look for ADC chips that have 20 Hz or higher sampling frequency.

Since you are using PIC with built in ADC, make a list of your input signals, from that list select signal with highest frequency, multiply that frequency by 2, now you have your the sampling frequency that you need, take this sampling frequency and look for PIC that has it or has even higher ADC sampling frequency.

As far as determining the frequency of the input signal, write sorting algorithm to select two nearest highest values, calculate the time between these two values, divide 1 by the time that you just found, now you have frequency of the input signal.
 

THE_RB

Joined Feb 11, 2008
5,438
Does Timer1 external clock input pin take sine wave ?

sine wave is 4V and the frequency range is the maximum i can get.
Not too much experience but some experience ;)
That input pin is a schmidt trigger input, and you can trigger it with any shape wave that goes higher than the Hi threashold (about 3.8v) and lower than the LO threshold (about 1.2v). Total hysteresis; 3.8 - 1.2 = 2.6v.

So technically you can trigger it with any wave that is larger than 2.6v peak to peak.

The questions you are asking seem to show that you have not had much experience inputting frequency waves into a PIC.

You really need to decide if you want to work digitally with the wave and only need to measure its frequency, or if you want to measure the wave with the ADC which is much slower (limits max freq) but lets you get more information about the wave, like its voltage and shape.

PLEASE provide more information, on exactly WHAT you are measuring and WHY you need to measure it. That stops us guessing in the dark, which wastes everyone's time (including yours).
 
Top