Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

record sounds and play them with a pic?

Status
Not open for further replies.

mashersmasher

New Member
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.
 
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.
 
https://www.allelectronics.com/cgi-bin/item/SAW-3/search/SAW_3_DIGITAL_VOICE_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.
 
bananasiong said:
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!

HarveyH42 said:
https://www.allelectronics.com/cgi-bin/item/SAW-3/search/SAW_3_DIGITAL_VOICE_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
 
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.
 
Last edited:
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 :D

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 ?
 
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.
 
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:
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! :D

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?.
 
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.
 
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. :D Like most projects, I used it because I had one and hadn't really done anything with it yet.
 
Last edited:
Similar Project

Hello, I'm doing a similar project, but I am looking for something with a little more bandwidth. I need to record musical audio (a guitar to be specific) using a PIC or other uController, so I need there to be a higher sampling rate. Anyone know of any ICs with these capabilities or people who have done similar projects?
 
Status
Not open for further replies.

Latest threads

Back
Top