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.

Setting sample rates for human audible recorded voice.

Status
Not open for further replies.

nikhilrajg

Member level 3
Joined
Mar 2, 2012
Messages
63
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Manipal,Karnataka,India
Activity points
1,834
Hello All,

How to set sample rates in PIC24F microcontroller. ?

I am using PIC24F128GA010 micro and want to sample the recorded voice so that the human can listen to it clearly. I can record the voice and I can even play it. After once I play it I just here some noise just as if we tune to some unknown radio-play station !!!!! :sad: I here only noice and nothing else. And this is the rate at which am sampling it.. How to do this and what values will be best suitable for this ?

Can I use Timer interrupt for this ?

Please help..

Thanks.
Nikhil Raj.
 
Last edited:

Don't know about the specifics of PIC23F configuration, but usual sampling rates for voice are 22 kHz or sometimes even just 11 kHz (saves a bit space but I guess high frequency components do get cut off).

I would also consider the possibility that for some reason the microphone is not transmitting the signal adequately to the MCU - check if it for example requires pre-amplification before being fed to the PIC, otherwise you may just record nothing (although hearing a lot of noise seems to contradict that, unless you over-amplify the output).
 

Don't know about the specifics of PIC23F configuration, but usual sampling rates for voice are 22 kHz or sometimes even just 11 kHz (saves a bit space but I guess high frequency components do get cut off).

I would also consider the possibility that for some reason the microphone is not transmitting the signal adequately to the MCU - check if it for example requires pre-amplification before being fed to the PIC, otherwise you may just record nothing (although hearing a lot of noise seems to contradict that, unless you over-amplify the output).

My PIC i.e., PIC24FJ128GA010 I can give analog input volts only within 2 to 3.6 volts. So as you said 1st I used an amplifier LM324 to amplify the voice. But It was exceeding the PIC's limits. So I removed the amplifier and mocified the circuit and for now the values are suitable for the PIC. My doubt is how to use Timer-3 as an interrupt handler to sample the voice ?

Say for example... How to set 44uS for 22050 samples/second ?? I mean the value to be set for the sampling rate ???

Thank You
Nikhil Raj.

- - - Updated - - -

Then can you please tell how to set that frequency ?? As you said its 22khz

Regards.
Nikhil Raj
 

hello


Before, You have to check what is the mimimum time to get a valide sample from the ADC part.
i don't know PIC24F , but theses information must be in datasheet.
This will give you an idee about the maximum sample rate .
Don't forget to add the duration of treatment ( store data ,time to go into interrupt .. etc..)
 

Hello paul !

Thank You for reply.

Are you talking about the internal oscillator frequency ?
If yes from the datasheet..

All of the devices in the PIC24FJ128GA010 family offer
five different oscillator options, allowing users a range
of choices in developing application hardware. These
include:
• Two Crystal modes using crystals or ceramic
resonators.
• Two External Clock modes offering the option of a
divide-by-2 clock output.
• A Fast Internal Oscillator (FRC) with a nominal
8 MHz output, which can also be divided under
software control to provide clock speeds as low as
31 kHz.
• A Phase Lock Loop (PLL) frequency multiplier,
available to the external oscillator modes and the
FRC oscillator, which allows clock speeds of up to
32 MHz.
• A separate internal RC oscillator (LPRC) with a
fixed 31 kHz output, which provides a low-power
option for timing-insensitive applications.
The internal oscillator block also provides a stable reference
source for the Fail-Safe Clock Monitor. This
option constantly monitors the main clock source
against a reference signal provided by the internal
oscillator and enables the controller to switch to the
internal oscillator, allowing for continued low-speed
operation or a safe application shutdown.

Thanks
Nikhil
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top