Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 11th May 2008, 02:20 PM   (permalink)
Experienced Member
mashersmasher will become famous soon enough
Default record sounds and play them with a pic?

is it possible to record small sounds like voice responses and play them from a pic? if so how would i record them and download them to the pic? i don't know how to use external memory but if that's what i would need i have often wondered how it is used.
mashersmasher is offline   Reply With Quote
Old 11th May 2008, 02:34 PM   (permalink)
Experienced Member
 
bananasiong is a glorious beacon of lightbananasiong is a glorious beacon of lightbananasiong is a glorious beacon of lightbananasiong is a glorious beacon of light
Default

Hi,
Is that for speech frequency? Record for how long?
Use ADC and PWM module of the microcontroller. Don't forget the anti aliasing filter.
__________________
Superman Returns..
http://www.supermanhomepage.com/imag...an-returns.gif

My friend created this account for me.. LOL
http://bananasiong.myminicity.com
oh.. somemore
http://bananasiong.myminicity.com/env
bananasiong is offline   Reply With Quote
Old 11th May 2008, 02:58 PM   (permalink)
Experienced Member
HarveyH42 is a name known to allHarveyH42 is a name known to allHarveyH42 is a name known to allHarveyH42 is a name known to allHarveyH42 is a name known to allHarveyH42 is a name known to all
Default

http://www.allelectronics.com/cgi-bi...RECORDER_.html

For $2.00, you get 30 seconds pretty cheap and easy. Have 10 of them, but haven't had time to do much more then take one a part. Pretty good value just for parts. The batteries included are fresh, 1" speaker plastic coil, electret mike, two pushbuttons. The figure is held on with two screws, easy to remove. The base makes a nice project case with battery holder built in. Plenty of room for a PCB slightly smaller the 2" square.
HarveyH42 is online now   Reply With Quote
Old 11th May 2008, 04:24 PM   (permalink)
Experienced Member
mashersmasher will become famous soon enough
Default

Quote:
Originally Posted by bananasiong
Hi,
Is that for speech frequency? Record for how long?
Use ADC and PWM module of the microcontroller. Don't forget the anti aliasing filter.
uh.. thanks. i don't know what any of that is especially anti aliasing but i will look it up!

Quote:
Originally Posted by HarveyH42
http://www.allelectronics.com/cgi-bi...RECORDER_.html

For $2.00, you get 30 seconds pretty cheap and easy. Have 10 of them, but haven't had time to do much more then take one a part. Pretty good value just for parts. The batteries included are fresh, 1" speaker plastic coil, electret mike, two pushbuttons. The figure is held on with two screws, easy to remove. The base makes a nice project case with battery holder built in. Plenty of room for a PCB slightly smaller the 2" square.
that would be alright but i want to have maybe 5 or 6 commands maybe 2 to 3 seconds each. thanks though
mashersmasher is offline   Reply With Quote
Old 11th May 2008, 05:49 PM   (permalink)
Experienced Member
Salgat is a jewel in the roughSalgat is a jewel in the rough
Send a message via AIM to Salgat Send a message via MSN to Salgat Send a message via Skype™ to Salgat
Default

Use the ADC on your PIC to record the voltage present at your microphone/speaker at a rate of twice the highest frequency you wish to record, and to play back the sounds simply send the values you recorded to a PORT at the same rate that you recorded the sound. The PORT will use an R2R network as a DAC.

If you wish to use sounds from your computer, simply convert your sound file to an 8-Bit Mono PCM wav format and convert it to HEX (Microsoft Windows comes with a sound recorder that saves to this format). Take the HEX version, remove the header, and set it as an array in your program.
__________________
salgat.blogspot.com

Last edited by Salgat; 11th May 2008 at 05:52 PM.
Salgat is offline   Reply With Quote
Old 26th June 2008, 02:49 PM   (permalink)
Experienced Member
 
AtomSoft is just really niceAtomSoft is just really niceAtomSoft is just really niceAtomSoft is just really nice
Send a message via MSN to AtomSoft Send a message via Skype™ to AtomSoft
Default

Quote:
Originally Posted by Salgat View Post
Use the ADC on your PIC to record the voltage present at your microphone/speaker at a rate of twice the highest frequency you wish to record, and to play back the sounds simply send the values you recorded to a PORT at the same rate that you recorded the sound. The PORT will use an R2R network as a DAC.

If you wish to use sounds from your computer, simply convert your sound file to an 8-Bit Mono PCM wav format and convert it to HEX (Microsoft Windows comes with a sound recorder that saves to this format). Take the HEX version, remove the header, and set it as an array in your program.
Bringing this back to life

How would one remove the header? Also if i dont use it the PC Way what would be the best way to save the recorded data on the chip ? eeprom ?
AtomSoft is online now   Reply With Quote
Old 26th June 2008, 02:56 PM   (permalink)
Super Moderator
 
Nigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to behold
Default

EPE did just such a project a few years back, they used an EEPROM to store the HEX data from the WAV file, and provided a PC program that transferred it via RS232, and presumably removed the header. WAV is a dead simple format, it should be trivial to remove the header.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline   Reply With Quote
Old 26th June 2008, 03:17 PM   (permalink)
Experienced Member
 
AtomSoft is just really niceAtomSoft is just really niceAtomSoft is just really niceAtomSoft is just really nice
Send a message via MSN to AtomSoft Send a message via Skype™ to AtomSoft
Default

ok found out header ends at Address 0x39 in the file. Was simple to find it. Made a empty wav hexed it and found it clean only header so removed it from other one and copied out all the hex values into a text file so i guess i have to send these hex values from my program to a eeprom? I need to buy one since it is around 500KB.

Can someone recommend some eeproms? Also anywhere i can get samples?

Last edited by AtomSoft; 26th June 2008 at 03:20 PM.
AtomSoft is online now   Reply With Quote
Old 26th June 2008, 04:01 PM   (permalink)
Super Moderator
 
Nigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to behold
Default

Quote:
Originally Posted by AtomSoft View Post
ok found out header ends at Address 0x39 in the file. Was simple to find it. Made a empty wav hexed it and found it clean only header so removed it from other one and copied out all the hex values into a text file so i guess i have to send these hex values from my program to a eeprom? I need to buy one since it is around 500KB.
Told you the header was easy!

If that's kiloBYTES and not kiloBITS then you should perhaps be looking at an SD card instead, the EPE example I mentioned used a 512kiloBIT EEPROM. I don't think you get them at 4megabit?.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline   Reply With Quote
Old 26th June 2008, 04:33 PM   (permalink)
Experienced Member
 
AtomSoft is just really niceAtomSoft is just really niceAtomSoft is just really niceAtomSoft is just really nice
Send a message via MSN to AtomSoft Send a message via Skype™ to AtomSoft
Default

wow now i have to learn about sd cards lol ok so any links and/or tutorials i can read up on?
AtomSoft is online now   Reply With Quote
Old 26th June 2008, 05:48 PM   (permalink)
Experienced Member
 
futz is a name known to allfutz is a name known to allfutz is a name known to allfutz is a name known to allfutz is a name known to allfutz is a name known to all
Default

Quote:
Originally Posted by AtomSoft View Post
wow now i have to learn about sd cards lol ok so any links and/or tutorials i can read up on?
Read the third post down in this thread.
__________________
=========================
Futz's Microcontrollers & Robotics
=========================
futz is online now   Reply With Quote
Old 26th June 2008, 08:29 PM   (permalink)
Experienced Member
 
philba is just really nicephilba is just really nicephilba is just really nice
Default

Here is a really easy way to do audio from a PIC. No need for a DAC - just a low pass filter (cap and resistor). It sounds like exactly what you need.

Official Home Page of the Roman Black
philba is offline   Reply With Quote
Old 27th June 2008, 01:50 AM   (permalink)
Experienced Member
 
AtomSoft is just really niceAtomSoft is just really niceAtomSoft is just really niceAtomSoft is just really nice
Send a message via MSN to AtomSoft Send a message via Skype™ to AtomSoft
Default

futz what uC do you recommend? i see your trying the 18F4620. Is there anything else ?

I have on hand a PIC18F448 and a PIC18F248. Would any of those do? I will buy from Futurlec those parts it seems like a nice challenge to work on.
AtomSoft is online now   Reply With Quote
Old 27th June 2008, 02:25 AM   (permalink)
Experienced Member
 
futz is a name known to allfutz is a name known to allfutz is a name known to allfutz is a name known to allfutz is a name known to allfutz is a name known to all
Default

Quote:
Originally Posted by AtomSoft View Post
futz what uC do you recommend? i see your trying the 18F4620. Is there anything else ?

I have on hand a PIC18F448 and a PIC18F248. Would any of those do? I will buy from Futurlec those parts it seems like a nice challenge to work on.
Either of those will work fine. It doesn't need anything special. Just SPI, so a MSSP module. The 18F4620 is overkill. I'm using 3 pins on it. Like most projects, I used it because I had one and hadn't really done anything with it yet.
__________________
=========================
Futz's Microcontrollers & Robotics
=========================

Last edited by futz; 27th June 2008 at 02:26 AM.
futz is online now   Reply With Quote
Old 27th June 2008, 11:27 AM   (permalink)
Experienced Member
 
AtomSoft is just really niceAtomSoft is just really niceAtomSoft is just really niceAtomSoft is just really nice
Send a message via MSN to AtomSoft Send a message via Skype™ to AtomSoft
Default

Ill use the 248 as the 448 seems like it would be a waste also... Now to order the other parts and read a lot!
AtomSoft is online now   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes




All times are GMT. The time now is 01:12 PM.


Electronic Circuits  |  Radio Controlled
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.