how to get the audio output in PSOC3

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

 i have the bit file of my sound wave. I want to create the sound in speaker. Can anyone suggest me how can i do it????????

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Hi,

   

I would suggest you use DMA-Transfer of your memory to a DAC. You should use a timer to match the sampling rate and transfer on each TC a sample byte to the DAC. When you use a 25 mA DAC output you can drive a small speaker directly.

   

Happy coding

   

Bob

View solution in original post

0 Likes
7 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Hi,

   

I would suggest you use DMA-Transfer of your memory to a DAC. You should use a timer to match the sampling rate and transfer on each TC a sample byte to the DAC. When you use a 25 mA DAC output you can drive a small speaker directly.

   

Happy coding

   

Bob

0 Likes
Anonymous
Not applicable

@OP:

   

I believe you're requesting how to use PSoC to play a locally stored sound wave file out a small speaker, not so much how to build a USB Audio device, correct?

0 Likes
Anonymous
Not applicable

@OP:

   

Take a look at AN69133 "PSoC 3/5 - Easy Waveform Generation with the WaveDAC8 Component"

   

Here's the link ->

   

http://www.cypress.com/?rID=54728

    

0 Likes
Anonymous
Not applicable

Using the Wave8 would be good. For those not so sure about using DMA. They can use a timer interrupt and read a data from memory and output it via a DAC. It can produce reasonable voice quality sound. I did that with a PSoC1 project. the voice quality is good enought for PA annoucment application.

0 Likes
Anonymous
Not applicable

Hello, here are my inputs on this. 

   
        
  • The IDAC/VDAC in PSoC3 can be used to play the audio directly. But there are certain things you need to be aware of. The maximum drive strength of the IDAC is 2mA. The pins in PSOC have a maximum of 24 mA sink capability.
  •     
  • Is 8bit resolution of internal DAC good enough for your application?
  •     
  • If you intend to drive a speaker directly, 2mA might be too less.
  •     
  • You can as well use the I2S component to drive a an external DAC. 
  •     
  • You can update the IDAC/VDAC with DMA or CPU. Refer this App to learn more about  basics of DMA and to see how to write data to the DAC using DMA, http://www.cypress.com/?rID=37793
  •     
  • This should probably get you going.
  •    
0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

i am using the attached file for creating the sound from the head phone.

   

 

   

I have sound file and converted it into the header file by wave to hex convertor. Now i have added it in my project its code not working so can you suggest some modification. 

0 Likes
Anonymous
Not applicable

Can you give us some information about PSoC Creator project? It would be great if you could attach your project here.

0 Likes