I am using trying to write code for an audio stereo system that samples using the onboard 12 bit a/d and then ouputs three different signals to three different pwm's each delayed with respect to each other by a few milliseconds. I am using the 56F8300 Demonstration board which has a 868323 cpu. I was hoping I could use the build in beans for a/d and pwm's. I tried using an the pwm event that interrupt at the end of every pwm period perhaps using the command PWM1_SetRatio16(AD1_GetValue16()); Also I what bean setting were good for the a/d or the pwm. Any help would be appreciated, especially if you could give me detailed instructions. I don't have too much experience with dsp's though I have used the HC11 with assembly and know some C++. Thanks, you can email me directly if you like. |
|
audio speaker system code, need help
Started by ●March 26, 2004
Reply by ●March 27, 20042004-03-27
Audio sampling requires some specific determinations. You need to
pick a sample rate that's about 2.2 times the highest frequency you want to
sample. (Nyquist says 2 times, but practically speaking, the sampling rate
has to be a little faster.) Typical audio sampling rates start at 8 Khz
for telephone quality audio ( 3.3 KHz maximum frequency). High quality
audio sampling is usually 44,100 or 48,000 samples per second (20
KHz maximum frequency). Set the sampling rate using an internal or
external clock and interrupt for the entire process.
It is also necessary to band limit the incoming audio (using an analog
filter, unless the DSP has it's own) to the highest frequency you wish to
sample to prevent aliasing.
A 12 bit A/D converter is not what is usually used for high quality audio
(16, 18, 20, 22, and 24 bit audio codecs are common), but 12 bits might
work.
Good luck.
dperlm22 <d...@yahoo.com> wrote: I am using trying to write code for an audio stereo system that |