1 2 3 4 Previous Next 45 Replies Latest reply on Jan 12, 2015 8:32 AM by net.eyal

    Usb Filter audio

    moshe2.lobo

      Hi

         

      I'm be trying go get an audio signal from my PC using USB and to filter it out to a speaker.

         

      I did this project and didn't figure out how to configue the filter (input, output, dma intetput)

         

      I use the usb_audio example, after change it to my speaker, and try it, I try add filter before VDAC8, but I didn't know how to configure well the Filter

         

      I attach the project.

         

      I would like to know how to connect it.

         

      Please help me!

         

      Thanks

        • 1. Re: Usb Filter audio
          user_302397898

           I am asking for clarification. Do you see a signal on the oscilloscope? If so, then you are doing well so far. Are you asking how to connect to a speaker? If that is your question, then you will have to supply an external amplifier to handle the 8-ohm load. Do I understand your question?

          • 2. Re: Usb Filter audio
            user_14586677

            His issue I think is streaming the audio thru USB >> DMA >> DFB >> VDAC8.

               

             

               

            Getting that to work. There are example projects that handle the DMA >> DFB >> VDAC8

               

            part of it, but he needs help getting DMA to capture the USB stream and forward that to the

               

            chain.

               

             

               

            Regards, Dana.

            • 3. Re: Usb Filter audio
              moshe2.lobo

              Hi Dana and 78RPM.

                 

              As Dana I mean to " streaming the audio thru USB >> DMA >> DFB >> VDAC8."

                 

              If you can help me at that, I thank you.

                 

              I try USB>>DMA>>AUDIO and work well on that.

                 

              USB >> DMA >> DFB >> VDAC8 I will thank you

                 

              thanks

              • 4. Re: Usb Filter audio
                user_49271930

                 
                Your project works. Check and remove J43 on the  KIT-050.
                Maybe you forgot to make it active:
                Right click --> Set as active project.
                 

                • 5. Re: Usb Filter audio
                  moshe2.lobo

                   Hi and thank you All,

                     

                  I am using psoc creator 3.0 and Psoc 5lp - cy8c5868axi-LP035   and the develeponet kit is cy8ckit-001

                     

                  and it doesnt work for me...

                     

                  I tried to get the data from the DMA to the filter(peripherial) and then to output it but i get on the osciloscope a square wave nor correct  and it doesn't react to the frequencies as it should react with the flter :(

                     

                  I added the code lines in order to connect the components in the main.c file  (//ADDED appears on the commetns)

                     

                  attached the project with docomuntation

                     

                  Please let me know what did I miss in the main file or schematic 

                     

                  Besr tregards and Happy Holiday :)

                     

                   

                     

                   

                     

                       

                              

                  • 6. Re: Usb Filter audio
                    net.eyal

                    Hi Lobo,

                       

                    1.I found that somtimes psoc has an issue with the names

                       

                     so  change VDACoutDMA to DMA in main.c and in the schematic

                       

                    2.check the NUMof BUF to 128

                       

                    3.you left a comment on the line comment on this line

                       

                    //while (Filter_IsInterruptChannelA() == 0) ;

                       

                    You need to active it, to give the filter option to intterupt the dma and start the streaming

                       

                    4. When You finish, try to change the intttreput options of filter, this can help you.

                       

                    If you have any question, feel free to ask me in this post and I happy to help

                    • 7. Re: Usb Filter audio
                      moshe2.lobo

                      Thanks on your reply

                         

                      I read it now.

                         

                      I have a meeting, and start to work on it immeditaly after the meeting and fix my project accoring to what you said

                         

                      Can you be avaible in the next two hours?

                         

                      Thanks

                      • 8. Re: Usb Filter audio
                        user_1377889

                        Reduce the filter gain from 10 to 1 (one) and project will compile.

                           

                         

                           

                        Bob

                        • 9. Re: Usb Filter audio
                          moshe2.lobo

                           Hi Bob

                             

                          I didn't explain myself well.

                             

                          The project compile, but the result of the filter (the output) is not curreclatad to the filter and to assign wave as expceted

                             

                          I mean, that maybe I don't know how to pass the infromation from the filter to DAC. 

                             

                          Did I need another DMA?

                             

                          This is any problem in the code?

                             

                          Maybe you can send me link to another example project that work with usb and filter?

                             

                          If not, what do I miss in my code?

                             

                          the input is sin and the output look like a squre wave plus sin I don't understand why?

                             

                          Thanks

                          • 10. Re: Usb Filter audio
                            user_14586677

                            One observation, you cannot tie speaker to a pin. Two reasons, VDAC

                               

                            output at 4V range is 16 K ohms, not buffered unless you use an OpAmp

                               

                            afetr VDAC8 set as follower. The other is speaker, if voice coil, is very low

                               

                            Z and needs a power stage.

                               

                             

                               

                            Here is a discussion on driving voice coil speakers -

                               

                             

                               

                                

                               

                                      

                               

                            http://www.cypress.com/?app=forum&id=2233&rID=105137

                               

                             

                               

                             

                               

                            Regards, Dana.

                            • 11. Re: Usb Filter audio
                              moshe2.lobo

                              Hi Dana and thanks a lot

                                 

                              the input is sin(generator) and the output(osciloscope) look like a squre wave plus sin I don't understand why?

                                 

                              I geuess the indormation dont pass as it should

                                 

                              how can I fix this?

                                 

                              Best regards

                              • 12. Re: Usb Filter audio
                                user_49271930

                                I do not remember the reason (I think the filter has a different byte order), but I had to swap bytes for the filter after replacing PSoC3 on PSoC5
                                like this:   ADC_LF = (int16)(*(LP_Filter_HOLDA_PTR+1)<<8) + *(LP_Filter_HOLDA_PTR+0);
                                I have already pointed to the Project   Project#102 – USB Audio using the PSoC 5LP
                                it uses Droop_Filter using DFB. Maybe it will help.

                                • 13. Re: Usb Filter audio
                                  user_1377889

                                  PSoC3 and 5 have different endianess. On PSoC5 there is no need to swap bytes, but the DAC only accepts positive values while the filter will deliver +-integers. Can be cured by CPU intervention (No DMA) or a self-made component.

                                     

                                   

                                     

                                  Bob

                                  • 14. Re: Usb Filter audio
                                    user_49271930

                                    Yes, Bob. You are right again. The filter works if the signal has offset.

                                    1 2 3 4 Previous Next