Is there any way to use a PICAXE (08M2, to be precise) to play a small sound file (Not beeps and buzzes, but actual sound), perhaps loaded from an i2c EEPROM chip? I'm thinking something similar to the ThinkGeek EvilTron: two or three seconds of decent quality, mono-speaker sound. If not, is there a small/inexpensive slave chip that can accomplish this? I'm not looking for something fancy or complex, just enough to amount to a homemade EvilTron. Thanks for any pointers.
Here's a link to aforementioned EvilTron, just so you know: EvilTron
(also note I'm fully intending on using speakers well below the PICAXE's current limits, so no need for an amplifier circuit)
Answer
(1) The 'easy' way
Add this RAMTRON FM25V02 32k x 8 IIC non volatile memory
You could use Roman Black's BTC encoder to convert WAV files to 1 bit serial files that the processor can output.
Typical background paper to PCM & friends - 1974 - old enough that what was leading edge hardware iis now almost trivial.
Roman Black inspired Circuit Cellar article for speech coding on an 89C4051
________________________________________________
(2) It's doable with on chip resources, with effort.
The PICAXE 08M2 has very limited memory capacity compared to what is needed for storing raw sounds files. PICAXE manual here in stock at Digikey $5.8=77/1
This will allow storage of 4 seconds of speech or similar quality sound at 8k samples x 8 bits per second - or a lot longer at lesser rates.
Recording speech and playing it back as bytes to an ADC is usually down at 8 kB/s x 8 bits/Byte = 64 kbps. You can get reasonable quality down to about 16 kbps with ADPCM and lower again with care. If you used say 1kB of the program memory for data storage that's 8 kbit so for 2 seconds = 4kbps and for 4 seconds = 2 kbps.
LPC will achieve this with ease - but a PICAxe will not like LPC decoding.
At 4 kbps you may be able to use say 2 bit ADPCM and get something approaching speech out.
Dinner time. Food for thought there. More later probably ...
Search for: Roman Black speech PIC
for about as good as you can probably do.
Failing that, an external IIC memory will allow you to do this easily.
(3) Complete speech recording and playback ICs are available.
"Chipcorder" / ISD / Nuvoton is one such and also here
No comments:
Post a Comment