Atmega WAV recorder

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hello to all
i want a code or an idea for record a sound from adc to micro sd card in wav format with atmega avr (mega32)
i want the sound be saved as transparent and smooth on mmc or sd and i be able easily play recorded sound with PC.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you would be interested in code for that doesn't quite work properly, I just posted a question here a few minutes ago! My project uses 8-bit audio and an ATTiny.
https://www.avrfreaks.net/index.p...

My project is based on a project described here:
http://s3-eu-west-1.amazonaws.co...

And my version of the code is here:
https://github.com/cbonsig/2313g...

Another good resource for you to check out is AVR335, an Application Note from Atmel that describes a voice recorder sample project.
http://www.atmel.com/Images/doc1...

Another approach that I've used successfully uses the Adafruit Wave Shield. This provides an interface to SD storage, and WAV playback using Arduino (ATMega328).
https://www.adafruit.com/product...

Good luck!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AVR335 then whack the 62byte header onto it.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hello to all
i want play 16bit 96000hz stereo wav file with atmega32.
Do you think this is doable?
Please guide me.
thanks alot

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I initially read that as 9,600Hz and though "yup, quite do-able" then I realised you meant 96,000. You aren't going to do that with a mega32 alone. If you add an external fast DAC (even an R-2R) you might do it.

For Stereo you may need two DACs (or get a stereo DAC).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

thanks clawson.
i could not play this sound with mega32's pwm

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Nope not at that frequency. If you downsample 96kHz to 9.6kHz and convert stereo to mono (just take every second sample) then THAT would probably be quite doable with a well chosen crystal frequency.

If you just stick to the mega32's internal RC but switch to the 8MHz one you can do 256 step PWM at 31.25kHz or some binary division of this (so 15.625kHz, 7.8125kHz).