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.

Need .wav (pcm) audio circuit -no mp3-

Status
Not open for further replies.

wafer101

Member level 4
Member level 4
Joined
Sep 16, 2002
Messages
70
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
529
wav player circuit

every one is talking about mp3 player. I instead need or would like to build a circuit that playes .wav file uncompressed read from some flash or from eeprom. the size of .wav file is unimportand even 64kB.
thanx for the help.
wafer101
 

pcm circuit

All you need for this is a DAC intended for the audio datastream - there are many to choose from - and a control circuit to clock the data from the memory to the DAC.

If you really want to play a .wav file in its PC-saved format, you will need an mcu to read the header in the .wav file and pass the datastream to the DAC. See here for some info on the .wav file format:

**broken link removed**

On the other hand, if you can write your own sound files with just the audio data in a known format (for example 16-bit, stereo, left-channel first, 44.1KHz sampling) then you can just clock this straight to the DAC with a little control logic.

For some DAC suggestions, try TI's list here - scroll down to the DAC's:

**broken link removed**

For a specific example from TI, try this:

https://focus.ti.com/docs/prod/folders/print/pcm1725.html

There are many other DAC's from many other manufacturers for this.

Cheers,
FoxyRick.
 

circuit play recorded sound

Hi, wafer101

And you should know the I2S protocol, there is a good link **broken link removed**.

Most of audio DAC based on this protocol.

Cheers,

Davy
 

sample player circuit

Ypu can transfer the PCM samples of a .wav file from your PC to a MCU and then write a code for the MCU to send it to a DAC...
 

play wav circuit

I once made a 8-channel sampler that dumped 16-bit wav audio to DACs. The DAC I used was a cheap maxim 16-bit serial dac, which worked OK.

The way it worked was that samples were stored in SRAM, a microcontroller recieved MIDI messages from an instrument and loaded a sample's address and length into an FPGA. The FPGA controlled the index (location in memory) of all 8-channels, and queued up the proper memory data when it was that channel's time to play. A second FPGA grabbed data for each channel and sent it to the DAC via I2C protocol.

The FPGA's were written in VHDL and compiled to Quicklogic chips. None of the routines were very complicated, I could probably send you some VHDL of how addressing, etc was done but it's all written for you in the datasheet for the memory chip you want to use.

If you just wanted to build a player circuit, all you need is a binary counter, a RAM chip, and a DAC. Use the counter to churn through all the different addresses in memory that your sample (16-bit mono wav) is stored. Start by resetting the counter to 0, and each time you clock out a new address to the memory chip, you also trigger the DAC to latch in a new sample - speed up the clock to speed up playback, etc. All pretty straightforward.

The reason I said mono wav is that the mono wav format is stored as the raw samples - no decoding is needed, just store the core block of wav data in memory and you're ready to play to DAC. Stereo wav alternates R sample, L sample but is pretty much the same.


If you can give some more specifics I bet we can get something working. Serial DACs are cheapest but you need an FPGA or PAL to clock in the data in the proper serial format. You could probably fit this into two PALCE20V8's, each of which gives 8-bits worth of logic.

Hope it helps!
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top