The simplest way to play an audio file with a microcontroller?

Status
Not open for further replies.

Choo5

Newbie level 4
Joined
Sep 25, 2011
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,313
Hi all,

I want to play an audio file (no specific formats e.g. mp3, midi, etc) with a Microchip 16F or 18F microcontroller, through an 8-ohm speaker connected to an audio amplifier IC like an LM386 but I do not know what the simplest way is.

I can maybe use an SD card, load the audio file to the card through a PC and then send it to the speaker with the microcontroller but was wondering if there is a simpler way. Is it possible to transfer the audio file to the EEPROM on the microcontroller? Something like representing it as an array of numbers, program it onto the microcontroller and then send it to the speaker directly?

Any ideas?

All the best.
 

the simplest way is to save any audio file *.wav (8 bit , 8 khz, mono, 7kb/s) format and save this audio into eeprom like 24c512 through ponyprog.

and to play directly read from eeprom and write it into the top value of PIC TIMER IN FREQUENCY MODE.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…