[sdiy] ADC/DAC to Microprocessor for Audio

James Patchell patchell at cox.net
Tue Nov 16 05:24:18 CET 2004


Simple question, difficult answer.

What you are attempting to do is...well....probably next to 
impossible...but what the heck...

You need to get yourself some books on digital signal processing.  I am not 
really sure which is the best one to get right off hand.  A book that has a 
good intro to the subject is Musical applications of Microprocessors by Hal 
Chamberlin (out of print).

Also, for Dacs and ADCS....

http://www.cirrus.com/en/products/pro/areas/mixedsig_av.html

Generally, for digital audio these days, 24 bits is the ruling word 
size....with a 192KHz sample rate...if you were to indeed use those 
criteria...you little pic would quickly be brought to its knees.  You need 
something with a little digital computing horse power.

Look at DSPs from either Analog Devices or Texas Instruments...think in 
terms of about 120Mips....minimum.

If you want some real computing horse power, graduate up to FPGA's....the 
Xilinx Spartan III or the Altera Cyclone II parts seem to be very well 
suited to DIY dsp work.

http://www.xilinx.com/products/spartan3/s3boards.htm

Is a good example of what can be had.

Now, if you really really want to use the Pic....

You first need to figure out what sample rate you are going to be running 
at...and on the PIC this will be determined by what it is you want to 
do.  So, you need to come up with an algorithm and then calculate out how 
much time it is going to take....so if let us say you do this and you find 
out that you can process samples at say 15000 times per second...well, that 
is going to be your sample rate, and the very best bandwidth you can hope 
for in a perfect universe will then be 7.5KHz...but, this is not a perfect 
universe... here is a quicky rule of thumb calculation...if you are using 8 
bits to A/D and D/A your S/N ratio, at best will be 48dB...in general, the 
anti alias filters are there to suppress all the bad stuff above the Fs/2 
frequency, so if you use a 8 pole butterworth filter your actual bandwidth 
will end up being 3750Hz (8 poles will attenuate by 48 dB in one octave)...

But, this is all pretty much a simple minded view...

If you are serious about doing digital audio, the Delta Sigma ADC's and 
DACs take care of a lot of the filtering for you and will make life a lot 
easier...doing an 8 pole filter is not fun.

Did I actually answer your question?

At 10:38 PM 11/15/2004 -0500, William Berzinskas wrote:
>Looking over the net,  it seems the general consensus is to not try what i 
>want to do..  but all that aside..
>
>What circuitry is need to go into a adc and out of a dac for use with 
>audio and a pic18?   most likely, the adc/dac would be single supply (i'm 
>mostly limited to dip here)..  so, i'd need to deal with that..
>
>also what kind of input filtering is necessary?   and whats this about 
>output reconstruction filter?
>
>
>
>On a side note..  I've tried some simple stuff like this before, but no 
>good results because the aforementioned were not handled..  just trying to 
>sample and output data..    one thing i noticed.  for instance: if i was 
>working with 8 bits..  how would i handle situations that caused an 
>overflow?  is there some averaging of bits here or something i should be 
>aware of?
>
>thanks in advance
>--billie blaze
>

         -Jim
***************************************************************
http://www.oldcrows.net/~patchell

***************************************************************





More information about the Synth-diy mailing list