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.

Read one Cycle of sine wave

Status
Not open for further replies.

rahul bhalla

Newbie level 4
Joined
Mar 5, 2013
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,318
hi
Actually i am keen to know that is it possible to read complete cycle of sine waves with the help of micro controller 16f877A or i use some other special device to read same
thank
any help is appreciated
rahul
 

is there is any other solution ????
Actually my main preference is use micro controller, so if there is a way then it would be best
thanks
rahul
 

Let me claim that's surely possibly to read a "complete cycle of sine waves" with PIC processor according to my understanding of the term. Limited RAM capacity has to be considered of course.

But what do you exactly mean with it? Which problem do you want to solve?
 

ur question is confusing. what r u exactly looking for?
1. if u want to find the period/frequency of sine wave. Simply convert the input sine wave to square wave by passing it thru internal comparator of 16f877a, then send the square wave to any CCP capture module to find the period of square wave, then apply freq=1/period to find the frequency of square wave in turn frequency of sine wave.
2. or u can use the internal 10 bit ADC and sample the incoming sine wave. If u wish to preserve the sine wave shape, u need at least 10 samples per cycle for that particular frequency i.e. if ur input sine frequency is 10kHz, the sampling rate should be 10kHz*10=100kHz or 100 ksps; to maintain the sine wave shape. So, to sample 10kHz at 100 ksps, u need to run timer for (1/100000) seconds and get at least 10 to 20 samples.

If u r looking for something else, plz specify so.
 
Thanks all for reply and precious help
Actually my aim is measure the frequency of the input sine wave but i am unable to understand how to i will take 10/20 samples or start my timer when ADC value is 0 and stop it when again adc is 0
 

As i explained, u dont need to use ADC for frequency measurement. Simply use method 1 i described above. I used same method many times to detect frequency, and its simple.
All u need is a comparator and capture of CCP module; and u r done.
use comparator to convert sinusoidal wave to square wave
send the square wave to capture module, initialize capture module to start counting on positive edge, if capture counting expires, maintain a static variable in interrupt routine, increment it, until another rising edge occurs. multiply the max count of capture into static variable plus the current count and use that count to divide the counter frequency, the result is ur answer of frequency.
 
  • Like
Reactions: FvM

    FvM

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top