- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your project works. Check and remove J43 on the KIT-050.
Maybe you forgot to make it active:
Right click --> Set as active project.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Reduce the filter gain from 10 to 1 (one) and project will compile.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As this question was raised many times, can Cypress add an optional field in the DFB component for user settable output offset value? For example 128 for 8-bit, etc. This should be trivial fix, but it shall allow for direct output to DAC without CPU intervention. For example direct ADC-DMA-DFB-DMA-DAC shall be possible after this fix.
odissey1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Consider filing a CASE on this so it gets forwarded to Creator design
team.
To create a technical or issue case at Cypress -
“Support”
“Technical Support”
“Create a Case”
You have to be registered on Cypress web site first.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I filed the case, will see..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am a little strapped for time but try adding a DMA channel and another
VDAC and DMA the same table directly to the VDAC to see if your table
is correct, that you see a undistorted 20 Hz sine.
You show a 10 uF out of the VDAC to scope. Effectively you have a HP filter
coupled with VDAC output Z, see datasheet for that. There is no real need to
AC couple output to scope, just DC couple into scope. Also if you had your
scope on AC coupled, it also has a high pass response in the input stage,
so see its spec to see its cutoff freq.
Lastly set your filter up with TIs online filter program with one of these -
http://www.dspguru.com/dsp/links/digital-filter-design-software, and
observe its response and magnitudes in BiQuad. The BiQuad has recursive fdbk
in its loop, so gain scaling as always to prevent saturation is a little more involved
in IIR filters than FIR.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oh sorry, I forgot to remove the capacitor - it is not needed. I did this project only to
show that the filter works great if scale = 100% and shift = -128.
i.e. signal must be int8 - as said Bob.
This is only if the signal is a sine or triangle.
I had to reduce meander signal: scale = 75% and shift = -96
otherwise I see distortion.
I.e. if the real signal will be high (turn into a square wave) I see a terrible signal to the output of the filter.
Therefore, I am interested in: how to find the maximum amplitude of the input signal (for meander) and how to affect setting (coefficients) of the filter to it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi pavilon.
Can you please attach your updated project, that I can see if it work well to me.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This from datasheet on gain scaling -
You could always set up a test case and examine the output sample
stream. Also look at impulse and step response in the Filter GUI, that will give
you an idea of G you should limit to, allow you to interactivley adjust G.
Also offset, data samples are uint8, uint16.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I use your project without changes.
I just removed the line 221 /////// VDAC8_SetValue(Filter_Read8(Filter_CHANNEL_A));
This created extraneous impulses.
The problem is not in the project:
How to create a sound 8 bit mono USBFS for your project?
My generator creates only 16-bit stereo, so I use a random offset to the signal turned out to be in the range int8, and this is a bad method.
p.s. I do not know your purpose, but I use the Sound Card Audio Adapter DAC based CM6206
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Pavelon
Thank you on your help
I try to convert music to 8-bit but not succes to do it.
I also try to download from 8bit music collection.
This is a 8 bit music but I afraid that the music itselft is not in 8 bit
I attach you the music, maybe it can help
Another thing. This is option to use only 8 bit on PSOC? This isn't worth a lot...
This is another option? Maybe of Texas Instrument
Thanks
Moshe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Dana
I see in your reply: The web site you are accessing has experienced an error.
I don't sure I see all your reply
Also, I happy if you can write me pratically, what to change.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The DFB is not an 8 bit engine, it is 24 bit -
If you want > 8 bit audio you will need external DAC.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I sent a signal to the ADC no use filter - and yes, I hear the 8-bit music.
This means that the music format is uint8, but the filter requires int8.
Apparently the problem is that the music written for unipolar DAC in format uint8 ((
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As I understand a filter, every high-pass filter will calculate-off any dc-offset from inputs and deliver a signed result.
Can this be the source of your issue?
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
...and that project contains a low-pass filter which will propagate a DC-offset to the outputs
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just reduced the input signal. You will need to apply PGA for a gain.
But I do not understand why it is necessary to reduce the amplitude of the input signal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When you have the filter gui opened check off the impulse response and/or the
step response so you can see it plotted. If you see the response > 1.0 then filter
G has to be reduced, otherwise you will overflow the VDAC, it will wrap around, and
produce spikes/distortion.
The above is an example where the G is too high.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hyurica!! Cool!!
It work!!
Thanks a lot Danna!
Thank to pavlon and bob, you are the best!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are always welcome!
Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Pavelon, I will try it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I tried the last projet and it doesnt work for me in the low frequencies(0-1000Hz) with g<1
someone knows why?