ADC module on 16F877A application

Status
Not open for further replies.

ae_13

New Member
hey guys,
im kinda new at this, im trying to program a 16F877A PIC microcontroller to recognize specific audio frequencies at certain time intervals - for example, 300Hz at 0 sec, 545Hz at 2 sec, 1231Hz at 5 sec, 300Hz at 7 sec and the loop goes on.. of course the audio input is supposed to be through a microphone or two
now herez my problem, i've read a whole bunch of tutorials on programming PICs, but i havent found what i seek
i've also read the Microchip datasheet on their ADC module
but i havent found an example on how to program such thing
so im kinda really totally lost here and in need of help, if any1 may kindly suggest any solutions
thnX 4 ur time
 
I did a forum search and Nigel posted this link last year which should give you a good head start. Tone detection in software is not as easy as you might think.
 
in "The 8051 microcontroller and embedded systems" by Mazidi and McKinlay the complete interfacing of 8051 n adc0808 is given. It may be useful to u.
 
thnX for your replies, i have read the previously mentioned articles
and after a bit of more thorough searching, it seems that i first need to use the ADC to convert the audio signal to a digital signal, then apply it onto the CCP module?
 
Once you get the signal digitized you still have to determine it's frequency components, that's the hard part.
 
well yea... now determinig its frequency would be through the Capture/Compare/PWM module, right??
or is there another way?
i mean does the CCP module convert the signal from time domain to frequency domain?
 
No the CC modules doesn't convert from the time domain to the frequency domain, it only detects rising and falling edges and time stamps them, this is NOT the same as detecting frequency unless you can guarantee that it will only get a periodic signal (pure tones never any noise or other complex sounds) The CC module has nothing to do with the ADC module though. You would feed your signal directly into the CC module's I/O line, a diode could be used to cut off the negative portion of the incoming signal and a zener could be used to prevent over voltage to the I/O line but you have to make sure your signal is strong enough to trigger the I/O line (specs for what voltages are considered high and low on what pins is in the PDF of your micro controller)
If this tone is coming from a microphone or other source where noise and ambient sound can be detected it's far more complex. Then you have to feed it into an ADC and use software FFT alogrhythms to determine the strength of the particular frequencies you're looking for and ignore the rest.
 
Last edited:
how about something that performs fourier transform on the digital signal.. to change it from time domain to frequency domain?? are any PICs that have that capability?
or a PIC that can be programmed using MATLAB???
am i still thinking reasonably??
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…