You are here

how to get the audio output in PSOC3 | Cypress Semiconductor

how to get the audio output in PSOC3

Summary: 7 Replies, Latest post by U2 on 27 Nov 2011 11:43 PM PST
Verified Answers: 1
Last post
Log in to post new comments.
saurabhme's picture
User
3 posts

 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????????

user_1377889's picture
User
10803 posts

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

Stub for 6132273's picture
User
2 posts

@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?

Stub for 6132273's picture
User
2 posts

@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

H L
user_460349's picture
User
1362 posts

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.

U2
uday's picture
Cypress Employee
569 posts

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.

 

saurabhme's picture
User
3 posts

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. 

Attachments: 
U2
uday's picture
Cypress Employee
569 posts

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

Log in to post new comments.