A/D and audio questions.
2004-01-03 by c45a6
Hello! I had some fun today and wired up my Mega 16 to a D/A converter. Knowing that it would probably sound terrible, I hooked up an audio signal directly to the Mega 16's A/D converter, and the output from the D/A converter directly to my mixer. Although highly digitized, I could kind-of make out the songs. Part of the problem could have been that I did a 10 bit A/D conversion and tossed out the lowest significant 8 bits. Another part may have been that I'm running into a 12-bit D/A converter on the output (of which I hooked up to the most significant bits). BUT, after some contemplation, maybe I also cut off 1/2 of the audio waveform, the part that goes negative, in the process. I'm going from an audio signal, straight into the Atmel Mega16's A/D converter, then out into a DAC7625 (12 bit parallel D/A converter). Here's my bascom program: $regfile = "m16def.dat" $crystal = 4000000 Config Adc = Single , Prescaler = Auto , Reference = Internal Start Adc ' Set all port c pins to output. The output of port ' c's pins go directly to the D/A converter. Ddrc = &B1111_1111 Dim Cv1 As Word Do Cv1 = Getadc(0) Shift Cv1 , Right , 2 Portc = Cv1 Loop Here's my question. What are my next steps? How does one manipulate the audio signal before feeding it into the A/D converter to get the best results? If I take the output of the D/A converter, it's going to be 0 - 2.5 volts. As far as I've seen, audio signals have both a positive and negative element. How can I take my 0 - 2.5 volts and spread it out over -5 to +5 volts? Thanks! I know this is a total newbie question. If anyone knows of a good website that answers my questions, please let me know. Direct answers are always appreciated too! - Bret