| Author |
Message |
peliasperro
Joined: 19 Jul 2009 Posts: 2
|
21 Jul 2009 10:46 frequency meter 8051 |
|
|
|
|
hello
can any one helpe me about who can i calculate the value of frequency by using counter.
The range of frequency is 0,25Hz to 3000Hz
if i want to input frequency to the microcontro then i want to know what is the value of it .
please i need code to do that and any information about it .
I have calulated, with the timer, the value of the signal pereiod. With this value,
How can i calculate the frequency???
with the formula 1/time????
please i need example to explan that with code in asm.
    
Thanks
|
|
| Back to top |
|
 |
xvibe
Joined: 11 Jul 2003 Posts: 93 Helped: 2 Location: Portugal
|
21 Jul 2009 16:42 frequency meter |
|
|
|
|
If you have a way for counting the number of pulses in a giving time window then you can measure the frequency.
Example: You need a timer programmed for 1s and a counter connected to INT port of the uC that is incremented each time the interrupt is activated then when the timer reach 1s you just need to do the math 1/counter value and you get the frequency. You need to restart the counter each time the time windows passes the 1s period.
|
|
| Back to top |
|
 |
Google AdSense

|
21 Jul 2009 16:42 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
Prabakaran
Joined: 22 Jan 2007 Posts: 160 Helped: 5 Location: Chennai(India)
|
14 Aug 2009 13:16 frequency counter 8051 c |
|
|
|
|
Dear ,
I can able to get the Frequency for the same in above method. But what the Problem i m facing is i m getting the value which is nearest to it.
For Example : 23.876 Hz
I am measuring at 24 Hz and 23 Hz which is toggling to these two values.
Please help for the same
|
|
| Back to top |
|
 |
nandhu015
Joined: 11 Feb 2006 Posts: 641 Helped: 46 Location: Tamilnadu, India
|
14 Aug 2009 13:37 frequency meter using c8051 |
|
|
|
|
Hai
| Quote: |
For Example : 23.876 Hz
I am measuring at 24 Hz and 23 Hz which is toggling to these two values. |
If you need it in fractions, you have to go for another method.
Measure the time between two pulses and convert it to frequency
frequency = 1/time
Regards
Nandhu
|
|
| Back to top |
|
 |
madicalphy
Joined: 22 Jul 2007 Posts: 68 Helped: 3
|
|
| Back to top |
|
 |