Yahoo Groups archive

AVR-Chat

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

Message

RE: [AVR-Chat] OT: Sound record/playback

2005-08-22 by Lasse Madsen

Would I be able to get better sound using a 10bit R2R network than using a
16bit PWM timer? 

Regards
Lasse Madsen



-----Original Message-----
From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf
Of Thomas Keller
Sent: 22. august 2005 15:02
To: AVR-Chat@yahoogroups.com
Subject: RE: [AVR-Chat] OT: Sound record/playback

On Mon, 2005-08-22 at 12:45 +0200, Lasse Madsen wrote:
> Raw sampling is a possibility I'm considering but then it's not
> possible to load the file into a PC for example without storing it as
> WAV or something similar.

   AIUI. "WAV" *IS* raw sampled audio.

> I think 8 KHz sampling rate is not enough to create a sound like one
> would expect from a tape recorder/MD or similar device.
> What if I "only" needed 16 KHz sampling from a 16bit DAC connected to
> the SPI or XMEM interface and stored that onto the card on the fly and
> then loaded one of the 16bit timers with the recorded result and
> forwarded through the "record buffer" with 16KHz wouldn't that work ?

   Using a 16 or 20 Mhz AVR, this shouldn't be a problem.  The actual
speed isn;'t going to be as big a problem for you in terms of fidelity
as the size of your samples.  8 bit samples are going to resultin a
pretty "grainy" sound.  10 bit samples will be marginally better.

> I have never tried to use the onboard 16bit timer for audio generation
> Is it possible to get a decent "sound" out of an RC filter being
> pulsed with PWM? 

   PWM actual.y offers a better solution than plain analog, in many
audio applications.  The higher speed AVRs are plenty fast enough to do
audio PWM (aka Class D) without difficulty.  You may want to consider
driving your output through a half-bridge FET circuit, and using
polarity switching, to get a true AC audio signal out.  The other
possibility, if you aren;'t restriced to single chip, is to use an
external DAC, but that is expensive, and given the 10 bit nature of your
sound (assuming you use 10 bit as opposed to 8) youwon't gain much.

tom




 
Yahoo! Groups Links

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.