I want to play a small .mp3 file using AVR ? How
I've been googling with no good result ,
Those are the result of m googling :
http://www.beyondlogic.org/pic/ringtones.htm
http://www.avrprojects.info/files/media/MMC-card-wave-player-circuit-diagram.gif
http://www.avrprojects.info/avr-projects/mmc-card-based-wav-player/
-
1There is a grave difference between playing .mp3 files and .wav files. The former requires decompression that is beyond the power of an AVR. – avakar Oct 16 '11 at 17:49
-
@avakar I'm thinking of transforming .mp3 into a tone and then display it , can I do this ? – xsari3x Oct 16 '11 at 18:31
-
1@xsari3x Do you want to display it or play it? – AndrejaKo Oct 16 '11 at 18:34
-
Play it on a speaker , sorry for bad English – xsari3x Oct 16 '11 at 19:16
-
1@xsari3x: Yes, you can play WAV tone without problems on AVR without any additional decoder hardware. If you use a MP3 decoder chip like VS1011 you can also play MP3 with AVR. – avra Oct 17 '11 at 14:09
-
@avra thank u a lot , I wish to make u +1 – xsari3x Oct 17 '11 at 21:40
2 Answers
From what I can see, 8 bit AVRs aren't fast enough to play MP3. Instead projects mostly rely on decoder chips. The idea is that the decoder will decode the MP3 in hardware and produce output signal which can be later processed in an amplifier and sent to a speaker.
From what I can see, you'd either need to get a board which can do the decoding for you like this (this one has SD card reader, amplifier and a small speaker too) or this (both use VS1011E decoder) or make your own board which will house the decoder, amplifier, SD card reader and so on. Here you can find a project which explains how to do that and here is one which used AVR Butterfly platform. Both projects have screens and are battery powered from what I can see.

- 23,261
- 25
- 110
- 186
Another approach is to use an external DAC and stream PCM (wav) data from an SD card. This is used in the Wave Shield for Arduino.

- 28,796
- 19
- 96
- 150