electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » Microcontrollers and Programmable Logic
Reading .wav Data on a Micro
Post new topic   Reply to topic Moderators: State Machine
Page 1 of 1 [4 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
skrasms



Joined: Feb 21, 2008
Posts: 121
Location: Portland, OR

PostPosted: Tue Mar 10, 2009 9:39 pm    Post subject: Reading .wav Data on a Micro
Subject description: I know other people would be interested
Reply with quote  Mark this post and the followings unread

My ultimate goal is to be able to drag and drop .wav files from my computer onto an SD card, then have a microcontroller able to read and use all the data.

This has to have been done before at least a hundred times over. Does anyone know any good places to look for example microprocessor code? I can set something up to read data straight from the SD card, but I don't know how to have a microcontroller recognize data that came from a computer.

Any help is appreciated. If other people are interested maybe we can make it a running project on here.

_________________
Software and Hardware Design
Back to top
View user's profile Send private message
yerpa58



Joined: Mar 08, 2008
Posts: 57
Location: Wisconsin
Audio files: 4

PostPosted: Wed Mar 11, 2009 11:52 am    Post subject: Reply with quote  Mark this post and the followings unread

Here is a file written in C using the CCS compiler. It is targetted for the PIC 16F chips running at about 10 Mhz. The program is for a small stand-alone board that plays 8-bit wave files at 11 KHz. It also includes the Xmodem protocol for uploading wave files via RS-232. Not exactly hi-fi, but the newer 18F series chips quadruple the speed of the 16F series.

Good luck!


T2k2v2.c
 Description:

Download (listen)
 Filename:  T2k2v2.c
 Filesize:  17.76 KB
 Downloaded:  470 Time(s)

Back to top
View user's profile Send private message Visit poster's website
okvern



Joined: Feb 05, 2008
Posts: 78
Location: Seattle, Washington
Audio files: 5

PostPosted: Tue Mar 17, 2009 8:27 am    Post subject: Reply with quote  Mark this post and the followings unread

Hi skrasms,

You might take a look at the Wave Shield for Arduino, at:

http://www.ladyada.net/make/waveshield/

Thanks,

Ole
Back to top
View user's profile Send private message
jksuperstar



Joined: Aug 20, 2004
Posts: 2503
Location: Denver
Audio files: 1
G2 patch files: 18

PostPosted: Tue Mar 17, 2009 9:22 am    Post subject: Reply with quote  Mark this post and the followings unread

You're going to need a few things:
1.) Depending on what size SD card you want to use, you'll need either FAT16 support, or FAT32 (for SDHC, or cards over 2GB). That'll be a library that reads the FAT tables off the card, so it knows what files are on the card, and where to find them. It also provides mechanisms for reading the card, with functions for file open, file close, etc.

2.) SPI or MMC/SD hardware interface code. This is low-level interface code that the FAT library will call to access the card.

3.) A WAV file reader. This should call the FAT library, to access the files, and then decode them for you for playing or editing.

Hopefully that get's you going in the right direction.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Moderators: State Machine
Page 1 of 1 [4 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » Microcontrollers and Programmable Logic
Jump to:  

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 vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use