Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Sending a WAV file on a Serial Port (Streaming)

Status
Not open for further replies.

saad_leo87

Newbie level 2
Joined
Oct 18, 2008
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,302
send wav to serial port

I'm trying to send a WAV file on a serial port and wish to use a uC (with a memory buffer) to receive it and forward it to a digital speaker

I'm using the Virtual Serial Port Driver 6.9 (by Eltima Software) to link a COM port pair (e.g COM2 and COM6) and using it to send the wav file serially from MATLAB to the circuit simulated on Proteus (using COMPIM)

The problem is that i'm uncertain whether the wav file (a sample file of 2 sec duration, sampling freq = 44100 Hz) will play correctly, because i'm converting the wav-file floating-point vector in MATLAB to hex first and then sending it on COM2....if i receive the hex-pattern in Proteus through COMPIM, send it to a uC....and use it to separate and send left and right channel on different pins and connect those pins (with a driving circuit/amplifier) to digital speaker, will it function correctly?

Also, does a serial port allows a data rate 57, 600 bps (without any software manipulations) ?

I'll be really thankful for any suggestions.....I'm in a real mess :s
 

wav serial port

I don't know what you mean by 'digital speaker' but you'll need 350kB of memory to buffer the wav if it's 16-bit stereo.

You could send the wav to the uC and have the uC store it on an SD card. For the uC to play the wav you'll read it from the SD card and send it to the DACs.

If you use 8-bit mono at 8000Hz, you'll need 16kB to store it or you could stream directly to your output if your com port will work at 115.2kbps. You could use PWM to output the sound if you don't want to use a DAC.

Have a look at **broken link removed** for a similar project.
 

    saad_leo87

    Points: 2
    Helpful Answer Positive Rating
send wav file to serial port

thanks alot for your help

and i'm gonna ask for more now =p

1. could you tell me how you did the memory calculations please?

2. does the physical com port support 115.2 kbps baud-rate? i thought it was upto 56 kbps only :s

3. what is meant by a pwm channel? i know what pwm is, but how do you use it to play a wav file exactly? :s
 


hello..

i'm still working the same project too..
and i need some resource for sending (streaming) *.wav file to serial port..
i'm using delphi programming..

should i convert the file to *.txt first..??
so the idea become like this:

file.wav => file.txt => serial port

thanks..
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top