Psoc 5LP audio samples receive

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

cross mob
Anonymous
Not applicable

I `m studying Computer Science at University of Granada, Spain.

   

I have an Android app that extract 16-bit audio samples from a mp3 file. I need to receive those samples at 44.1 kHz with HC-06 bluetooth module connected to my psoc 5LP.

   


I need some guidelines to program my psoc. My initial idea is to transmit samples from UART module to a buffer and a DMA module to read samples from the buffer at 44.1 kHz,  to send it to a DAC module connected to an analogic output. 
 

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

Do it in steps: (i) First make UART BT transfer example from PC to PSoC; (ii) send received data to VDAC directly (no DMA involved); (iii) if you have time left, play with DMA.

   

I don't think you will see much difference by utilizing DMA in this case.

   

I am attaching UART Rx demo program, which you can use as a starting point. It receives incoming data ito circular buffer, which you can make large enough to keep up with incoming stream. You would have to develop your own data protocol, and to make it as compact as possible and error-proof. Finally, there are only 8-bit DACs on PSoC, so there is no sense to send 16-bit data. To achieve 44kHz you  have to set UART rate to 500 kbd (do not forget to reprogram HC-06). Test everything at slow rate first.

View solution in original post

0 Likes
2 Replies
lock attach
Attachments are accessible only for community members.
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

Do it in steps: (i) First make UART BT transfer example from PC to PSoC; (ii) send received data to VDAC directly (no DMA involved); (iii) if you have time left, play with DMA.

   

I don't think you will see much difference by utilizing DMA in this case.

   

I am attaching UART Rx demo program, which you can use as a starting point. It receives incoming data ito circular buffer, which you can make large enough to keep up with incoming stream. You would have to develop your own data protocol, and to make it as compact as possible and error-proof. Finally, there are only 8-bit DACs on PSoC, so there is no sense to send 16-bit data. To achieve 44kHz you  have to set UART rate to 500 kbd (do not forget to reprogram HC-06). Test everything at slow rate first.

0 Likes
EvPa_264126
Level 7
Level 7
500 replies posted 250 replies posted 100 likes received

Another 2 projects to start:
1. UART_Cogfig_Device.zip The program checks the module HC-04, and adjusts the transfer speed.
2. TDA1311A   DA1311A.zip  An example of using a  a stereo 16-bit DAC DA1311A ( OLD CDRom)
It is located here:  http://mylab.wmsite.ru/moi-razrab/cypress-psoc/
44.1кГц + Stereo16 bit - it seems a lot for Bluetooth UART can be problems (not sure).