Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: A/D and audio questions.

2004-01-03 by c45a6

Oh, poop.  I just lost a huge e-mail response.  Argh.  

In short, thanks for the advice!  Speeding up the ADC really helped.  
It's still distorted, but I can now hear notes and lyrics. :-)

Tomorrow I'm going to post again asking more questions about the AC 
coupling.  I'll whip up a schematic to help out.  Am I still cutting 
out 1/2 of the audio signal, even after the ac coupling?

Thanks!
- Bret

--- In AVR-Chat@yahoogroups.com, "Larry Barello" <yahoo@b...> wrote:
> You can speed up the ADC by specifying a small clock divisor.  The 
default
> is around 64 or 128, but you can specify 8x or even 4x and get much 
faster
> conversions.  The accuracy will suffer, but, so what.  With a 4mhz 
clock and
> a clk/4 ADC clock, each conversion will take 13 us for a conversion 
rate of
> ~76k/s.  Hmm, I guess clk/8 will give you ~38khz conversion which 
should be
> plenty good.  Read the BASCOM help for "config adc" and 
replace "auto" with
> 4 or 8 (or whatever) to get the faster speeds.
> 
> To AC couple your signal, you need a capacitor between the ADC 
input and
> your signal.  Use your Vcc/2 to bias the ADC side of the 
capacitor.  The
> size of the resistor and the capacitor will be somewhat important, 
but alas,
> my electronic theory can't help you here with hard numbers.  Try 
10k + .1uf
> ceramic cap to start.
> 
> Cheers!
> -----Original Message-----
> From: c45a6 [mailto:clone45@h...]
> 
> >
> > Try hopping up the A/D to 250kHz, and using all 8 bits.
> > AC Couple your audio, and weakly (10k?) pull the A/D input to
> >VCC/2, and use VCC as your analog ref.
> 
> Thanks for the fast response!  I have some follow up questions.
> 
> 1. Er.. How do you hop up the A/D to 250kHz?  Do you set the ADPS
> bits of ADCSRA?  I'm using the internal clock.  Is that a big no-no?
> 
> 2. "pull the A/D input to VCC/2" Sorry, my electronics language
> skills are terrible.  Do you mean run a pull up resistor (around 
10k)
> between VCC/2 and the A/D input pin?  I just happen to have a VCC/2
> source on my board already that I use for the reference voltage on
> the D/A converter.
> 
> 3. How does one AC Couple the audio?  Do you have any links to
> schematics for that?  My pathetic little electronics books don't
> cover that subject. :-(
> 
> A million thanks!
> - Bret

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.