2 Replies Latest reply on Aug 10, 2018 12:28 AM by user_342122993

    Using DMA to play music with PSOC 5LP

    StefanIonescu

      Hello!

       

      I have been trying for a while now to devise a way to play music from an SD card using the PSOC 5LP. I initially have tried to do a direct read from the SD card, save the data into a variable and then write it to a VDAC. However since there is only 1 core i am unable to play sound when i am reading from the SD card thus the audio sounds 'choppy'.  I have tried to read into the PSOC ~56kB(8s of audio) however for some strange reason the PSOC stops to work even though I do have the RAM for it =S. So i have settled now for reading in 8kB(1s of audio) as it manages to play for the duration of the song.

       

      I am wondering if it is possible to read data into memory and then use a DMA to directly feed the VDAC, thus allowing the DMA to continuously feed the VDAC and have a better quality of sound. Is this possible and does anyone maybe have some examples of how to set up a DMA to transfer data from a sting to a component like the VDAC?

       

      I have attached my current WIP project for those interested

       

      Thanks for the help!

       

      Stefan