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.

USB thumb drive + PIC + speaker

Status
Not open for further replies.

yagtoby

New Member
I would like to play music files(WAV format) stored in thumb(pen) drive using PIC to a speaker output. The input is a simple press to contact and release switch.
For each contact of the switch, the music file to play for 20 secs and for the second contact another music file.. for 20 secs... and after 20 files playing reset to the first file.

could somebody give me a lead to go about.

thanks in advance.
 
PICs are NOT capable of interfacing directly with USB devices; they can act as USB devices to a computer, but they cannot act as a USB host to another device. It could be done using an external USB host interface chip, however those are also very complicated devices and it would NOT be a reasonable project for someone who is a beginner (or even intermediate) with PICs.

SD memory cards are a simpler option, they can be interfaced via the SPI serial protocol which a PIC can easily handle, and they're about the same price as USB thumb drives anyway. If you add a card reader (inexpensive) to your computer, and implement the FAT16 file system (rather than reading/writing raw data on the memory card), you can easily access the card directly from your computer as well.
 
Usb On The Go might be a sollution, but this would only work for USB on the go thumb drives, the smarter sollution really would be using an SD card, interface to an SD card is almost trivial on a micro controller, and SD to USB adapters only cost a few bucks. If you want to avoid sounding like a bad PC speaker buzzer though you're going to want to use a true DAC not a 1bit or PWM dac, for quality.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top