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.

[51] i want to know the logic for period & frequency measurement using 8051

Status
Not open for further replies.

kokanepd

Junior Member level 3
Junior Member level 3
Joined
Oct 9, 2013
Messages
31
Helped
1
Reputation
2
Reaction score
1
Trophy points
8
Visit site
Activity points
169
i want to know how i calculate the period & frequnecy using 8051.which logic i use to calculate period & frequency for any wave input to 8051.
 

Give the wave in an interrupt pin. During interrupt, start a timer and end it when the interrupt comes again (assuming a square wave). The timer value is period. You can calculate the frequency by taking the inverse.
 

if i give the sine wave as input & we know that timer count only pulses .so i want to know the how i convert the sine wave into pulse or square wave.
 

If the sine wave is in positive amplitude (Within the input signal spec of microcontroller), your sine wave will appear to the microcontroller as a HIGH-LOW wave only.
High when sine wave amplitude is above "Vih min" threshold.
Low when sine wave amplitude is below "Vil max" threshold.
 
if i give any wave to microcontroller, is microcontroller give the period or frequency? i want an ic that convert any wave to pulse form which compatible with microcontroller .
 

Don't give the sine wave directly, use a comparator with the inverting terminal grounded. This will convert the sine to a square, then measure the time period of high signal as sankar.m8 explained. This will give half pulse time, double it to get the complete wave time, assuming you have a symmetric wave.
 

Yes. jayanthyk192 is right. You can use a comparator to convert sine wave to square wave. But it also possible to feed the sine wave directly to microcontroller if the sine wave is meeting its input electrical characteristics of microcontroller.
 

You can use ADC if you need a number of samples in the input analog signal, ie. for a n-bit ADC, you will get each bit change when the input voltage changes (Vref/2^n). Using comparator you will get only two values (Above Vref, Below Vref), you can say the comparator as a single bit ADC.
 

i am using the timer for calculating the period but i am not getting the period accurately according to input that i given
 

Re: i want to know the logic for period & frequency measurement using 8051

What is the input signal frequency you are using?...at what speed the timer is running?

- - - Updated - - -

If you are using a signal frequency << timer frequency, you will get an accurate result (Increasing resolution of timer).
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top