WAV playback with an ATmega32

[Vinod Stanur] just finished another hobby project by building a WAV audio player using a microcontroller. He had started development a while back using a PIC microcontroller. But the chip he was using didn’t have enough SRAM to allocate as a playback buffer. When he got his hands on an ATmega32 his mind turned back to the project and he saw it through to the end.

He takes advantage of what he learned on several earlier builds. He’s using a TV remote as input, just like his Snake game did. Storage is provided by an MMC card, a trick he perfected with this voice recorder project. Instead of using a FAT library, he uses his own code to read the linked-list (File Allocation Table) for sector addresses, then he¬†parses the WAV header and processes the file accordingly.

Playback uses two 512 byte buffers. One is feeding the output while the other is being populated from the memory card. When the output buffer is exhausted the two are swapped and the process continues. You’ll find [Vinod's] demo of the project after the break.

Comments

  1. nymgeek says:

    I must try something like this at some time. Maybe use the ADC to apply effects to an audio stream.

  2. jameswilddev says:

    Using an RC lowpass with the PWM outputs eh? Works quite nicely in my ATMega DSP experiments too…

  3. philip says:

    Correct me if im wrong, the RC low pass is for recreating the analog waveform from the digital pulses right?

  4. great project!

  5. peter says:

    hi,

    whats the software he used to simulte the firmware?
    i can see a picture of the lcd showing something.
    is this a live-simulation?

    regards

  6. Vinod S says:

    It is not any simulation… I had written the text “MMC INITIALIZED” using MS PAINT :-)

    But you can simulate LCD on proteus. Any way I didn’t tried any simulations yet..

  7. peter says:

    i already know that this is possible with proteus.
    i got to know it by a HUGE incident!

    is there other software to simulate mixedsignal circuits like proteus?
    in proteus i’m missing support for new microcontrollers and fpga in generall.
    regards

  8. john says:

    excellent work… Sounds well!
    Thanks for sharing the source code.
    Will it support SD cards? Or only MMC?

  9. vinod says:

    at present, it supports only mmc, but I will try to add SD support with in short time…

  10. Rohit says:

    Can you please share the source code for WAV playback with an ATmega32 project. Thanks

  11. nishat says:

    can anyone give me the source code of this project….plzzzzzz

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 94,052 other followers