|
|
It is actually possible to use a 8
bit PIC's to reproduce sound but the road is quite long and a bit bumpy.
First of all you will of course need one or more wave soundfiles, not to long though
as the files are stored in the PIC's program memory, then you will have to
process the sound file(s) with a sound editor eg. GoldWave - trim sound
start and stop points, raise volume to max and downsample to the appropriate
format, encode to 4bit Adpcm with WinSpeech from Microchip application note
AN643 and use my brothers Adpcm2hex software to generate a Basic include
file or a C file for eeprom storage (experimental). Take a look in the pdf
file below for our recipe. Download the source code for our helloworld sound file example
and try for yourself. We use a R2R resistor network as DAC and an active
opamp forth order filter to filter the sound, we will reveal this later.
Below you can see some pictures of the software my brother has made
to make an include .bas file for a basic compiler or a hex file for an
eeprom to use with an C compiler (click on the picture to enlarge it):
| This is how we generate an
adpcm file for a 8 bit PIC to reproduce sound. |
 |
|
| We use
GoldWave to process the soundfile, helloworld in this example. |
 |
|
| We use
WinSpeech from Microchip Application note AN643 to generate the adpcm
file for my brothers software. |
 |
|
| This is
helloworld played by a 18F452 and recorded on a PC and encoded in
128Kb mp3 format. |
 |
|
| Adpcm2hex startup splashscreen |
 |
Adpcm2hex 2.40
2009.12.30 |
| Basic (.bas
file) include file option choosen (MCU = Micro Controller Unit), with
the adpcm soundfile helloworld loaded. |
 |
Helloworld source code example 2009.12.30 |
| The processed
include .bas file. |
 |
|
|
C eeprom file option choosen, with the adpcm soundfile helloworld
loaded. You can choose between different eeproms with the radio buttons
on the right and the progress bar at yhe bottom shows how much space
your soundfile(s) are using. |
 |
|
|
The processed C include file with sound data start and stop points. |
 |
|
|
The processed eeprom hex file, ready to be burned in an eeprom. |
 |
|
| |
|
|
This page was last updated
2010-01-07.
|