Let's Make Robots!

Ever sampled audio and stuck it on an EEPROM?

Has anyone sampled any kind of audio and was able to stick it on an EEPROM? If so, how was it done? Did it work and how complex of audio were you able to use? There has to be a sampling rate involved here so maybe just some of that 8-bit Super Mario Bros. stuff, right? Gimme what ever ya got!  --Oh yeah, what about playback, as well....

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I actually have been looking at the mp3 player box. However, to justify the dough... On the other hand, with the ability to have the picaxe zap to specific tracks etc. it might be worth it. I am a podcaster, for cryin' out loud, it is a piece of cake to record myself and do a little voice change action into a "robot" voice. I dunno... I think it seems that the MP3 unit is just a little bit of a cop-out. I mean, c'mon what would MacGyver do?

Anyone else?

I'm on a Mac, far away from any Picaxe and all, so this is NOT tested, but check out the command "setfreq"

Perhaps this will work & give you an idea:


Version A:

for b0 = 70 to 120
sound 0, (b0,1)
next b0


Version B:

setfreq m8
for b0 = 70 to 120
sound 0, (b0,1)
next b0
setfreq m4


I'd say that all you would have to do is to make a similar routine as the botton one, but instead of just "sound", make one read from microphon e & save to EEPROM (Record), and one to read from EEPROM& play back to speaker. That should do it :)

To read from the microphone you should be able to just hook up a microphone to the analouge in. I do not know if it would chop off half of the "sine", thus make a nasty distorted sound.. But I know that something can be read this way, because in some versions of YDM's I used it to detect if there was anything to hit on with the drumsticks.

No, wait I am lying. I just remember, I only had one microphone, and so I first sampled with the sampler board, and then I made it play back.. and the playback / speaker output was hooked up to the analouge in on the picaxe. Sorry. But then again, I never tried to just hook up the microphone directly, It may give something.. Perhaps use the readadc10 command, or some amplifier. Amplifiers can be found in cheap PC-speakers. But hey - will that take a microphone signal and bosost it, or would it need a line in?

I better shut up :D

I am going to try a direct mic in and I will also run it thru my mixer turning it into a line level signal. Both into an ADC... I'll let you guys know what I get! --Thanks all for the inspiration! Here's to hope!

Yep. Did this back in 2002. made a sponge cube for my son with a box of electronics inside. The cube had shapes on the outside and when the toy was rolled, it spoke the colour or name of the shape on the upmost face in French or English in mummy's voice or daddy's.

I2C EEPROM (24LC series like the ones you have) interfaced to a PIC 16F628 at 4MHz. The pic had a resistor ladder on one of the ports to make a really fast playback DAC. The sound was stored in EEPROM raw. (No particular format, just a set of 8-bit samples.) I was able to play back at 22kHz. I never tried any faster than that.

In a 24LC512, you have 512Kbit = 65536 bytes. At 11kHz (ample for little crappy speakers), you'd get 65536/11000 = nearly 6 seconds of sound.My system had 8 of them (the maximum for a single bus) for a massive 47.66 seconds of 11kHz 8 bit audio. (For reference, I think CDs are 44kHz 16-bit. If anyone can be arsed to google this, feel free to correct me.)

I used the JDM programmer to flash the EEPROMs. Probably the hardest part is taking in a WAV file or whatever and converting it to a raw byte stream. I wrote a bit of Visual Basic to do this, which doesn't even run in the latest version. I'm certain there's freeware to convert to raw, though.

I expect you only want to know that it CAN be done... Ask me questions.

Found it. It still LIVES!! Man, I'm going to ressurect this. Maybe with one of those new sexy I2C DACs. And a bigger amp. And accelerometers instead of mercury switches....!


Only the BEST for my baby... Mercury!!! No, seriously -That's some great info, BOA thanks. One note though, I would think a guy as smart as you would know how to spell "color"!!

Oh, this was made back in the olden days before Mercury became harmful. I have mercury in virtually of my teeth and it never did me any harm.

PS - I can spell COLOUR perfectly well. Add to this list my ability to spell CENTRE and also ALUMINIUM. Speaking of which, following the logic of American English, removing "spurious" letters (like the "i" from aluminium) should "plutonium" not be spelled "plutonum"?

The sooner Microsoft realises there's no such thing as "American Enlgish" the better.What was wrong with the King's perfectly good English your ancestors took over there with them that they had to go and butcher it?

No car seats because no kids ever died in cars.

Everyone's parents smoked in the house, because no one breathed.

--Same with asbestos (no one breathed)

Good ol' lead paint (it was heavy and held the house to the foundation)

Yup, I remember... Man it was fun before liability... The Cop just made you pour it out and sent you home.

Hey, I remember this cool period!

No polution either; If we had any of that stuff we just let it out in a river or something, no problems, great times, why all the worries of today?


PS: Impressive toy, BOA! :)

When I learned Spanish, I worked in a cabinet shop with people who spoke Mexican Spanish... What did I do? I bought CD's containing Spanish from Spain and English from England!!!