View unanswered posts | View active topics It is currently Fri Aug 01, 2014 11:50 am



Reply to topic  [ 2 posts ] 
 Help me with my birthday gift for my little cousin! 
Author Message

Joined: Fri Aug 20, 2010 8:38 am
Posts: 23
Location: Australia
Post Help me with my birthday gift for my little cousin!
Hi everyone!

My 6 year old cousin loves to jump around and say "spiong, spioing, spiong" like she's a spring or something, so i thought I'd make a little thingy that makes the sound for her, so she can spioing around all day without getting a sore throat. I have started with a pedometer connected to the SX28, flashing an LED everytime the little arm goes down and counts a step. The hard part is to play a certain sound ( prefferably a wav or something) instead of lighing up an LED. From what I've red, a 44 khz sound that lasts 500 ms would be to much for the SX's memory. I'm not sure about how to add external memory or how to get a wav file from the internet into assembly/BASIC for the SX or an external memory. Any ides about how to proceed? Can this be done by using the PWM ?

Thank you
Qbert


Wed Aug 03, 2011 8:27 pm
Profile
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 286
Post Re: Help me with my birthday gift for my little cousin!
Hmmm - there are a billion ways to do this. The easiest is probably this --

1. Get a SPI or I2C serial EEPROM. They make them up to 1Mbyte now. But, 256K byte should be fine.

2. You will need to get the raw PCB wav data into the chip, you can do this maybe with a serial port and a program that takes bytes from the serial port and writes them to a fixed location $0000 in the EEPROM and fills it up with data. Bottom line you need to get the data into the eeprom.

3. Now, you have the data in the eeprom, now you read each byte with the SX-28, you can just blast it out of a R2R ladder 8-bits at a time at the playback rate. You just need a R2R ladder connected to a speaker via a 100uf cap, or if you want to get more fancy, you can put an LM386 audio amp on there as well, and really amplify it.

That's about it -- use a serial EEPROM, SPI is easier protocol and 100x faster. Get your RAW PCM 8-bit wav data into the EEPROM at say 11Khz is more than enough. Then a simple 256K byte eeprom will hold 23 seconds of audio data. Then play it back. Then if you want to get fancy, you can use RLE encoding on the audio data, to smash it a little, etc.

The biggest challenge is you have to get the data from the PC to the eeprom, thus you will be best off making a really simple serial RX driver, and then it waits for the PC TX to start sending, then just records the stream of bytes until its done, then they are in the EEPROM, then its just a 20-30 line ASM driver, and a few resistors, etc.

Andre'


Thu Aug 04, 2011 9:12 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware.