DSP Band Pass Filter Wiki Eg not working

For general Flowcode discussion that does not belong in the other sections.
canary_wharfe
Posts: 91
http://meble-kuchenne.info.pl
Joined: Thu Dec 10, 2020 3:54 pm
Has thanked: 6 times
Been thanked: 11 times

Flowcode v10 DSP Band Pass Filter Wiki Eg not working

Post by canary_wharfe »

Anyone know why the wiki DSP filter examples aren't running. i.e. fail to simulate? Tried in Flowcode 9 and 10 and both fail.
The sim gives multiple errors: Unknown or missing components. I really thought these would work off the bat as they are in the wiki help files designed to give users insight how to use the DSP functionality. I downloaded the .fcfx file and it just doesn't run.
Anyone?

medelec35
Matrix Staff
Posts: 1966
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 629 times
Been thanked: 659 times

Re: DSP Band Pass Filter Wiki Eg not working

Post by medelec35 »

Hello.
Thank you for letting us know.
I will have a look and see what I can do.
Martin

canary_wharfe
Posts: 91
Joined: Thu Dec 10, 2020 3:54 pm
Has thanked: 6 times
Been thanked: 11 times

Re: DSP Band Pass Filter Wiki Eg not working

Post by canary_wharfe »

What I don't understand is why when you open the bandpass fcfx file in Flowcode and look at the chip/properties selection; the chip is showing a non Microchip DSP device. How can you run a DSP simulation with a non DSP device? Or does the Flowcode simulation ignore the chip selection and its only needed when compiling?

.... On Flowcode 9 just had a look inside the macros for the filter and it looks like no coefficients have been set or anything in the properties. I'm either totally missing something here but is this fcfx file unfinshed? More a proof of concept illustrating steps required or is it supposed to be a fully working fcfx simulation. I'm totally lost on what this file does or is supposed to do.

medelec35
Matrix Staff
Posts: 1966
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 629 times
Been thanked: 659 times

Flowcode v10 Re: DSP Band Pass Filter Wiki Eg not working

Post by medelec35 »

Hello.
The DSP components allow any microcontroller within reason to run DSP functions.
I have converted the BPF to load with Flowcode v10
Attachments
BandPassFilter.fcfx
(20.58 KiB) Downloaded 24 times
Martin

canary_wharfe
Posts: 91
Joined: Thu Dec 10, 2020 3:54 pm
Has thanked: 6 times
Been thanked: 11 times

Re: DSP Band Pass Filter Wiki Eg not working

Post by canary_wharfe »

Hi Martin
Thanks for that. I confirm it now simulates but could you PLEASE just explain what the PWM circuit is doing in this example. I can see the PWM mark space going up and down but I'm not sure how this relates to the pass band filter. I was thinking the demo should show the frequency changing into the filter and then something like a scope would illustrate frequencies outside the passband getting attenuated. I'm wondering if the passband upper lower Fq setpoints are being set by the potentiometer?

Also just wondering if it's possible to change the name of the 3D panel from 'NewPanel' to some other name related to the project?

medelec35
Matrix Staff
Posts: 1966
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 629 times
Been thanked: 659 times

Flowcode v10 Re: DSP Band Pass Filter Wiki Eg not working

Post by medelec35 »

Using the data recorder you can see the analogue wave and the filter response changing as the frequency changes. Basically allows you to play with the filter coefficients and modify the frequency to see how the filter performs.

The PWM is just providing an analogue output but would need a R/C filter to make it truly analogue.

The 2D panels within FC10 can be renamed by following this Wiki link.
Martin

canary_wharfe
Posts: 91
Joined: Thu Dec 10, 2020 3:54 pm
Has thanked: 6 times
Been thanked: 11 times

Re: DSP Band Pass Filter Wiki Eg not working

Post by canary_wharfe »

Thanks Martin, that's made it easier to understand. Much appreciated.
BTW. FYI I was looking at the DSP Recifier.fcfx example code this evening on the WiKi and that is mis-behaving (no simulation / simulation error) in exactly the same way as the filter example was doing before you fixed it!!!
I know you've probably got a boat load of customer queries to get through without having to worry about WiKi example code; but if you could find the time to look at it in the future and add your magic to get it simulating it would be helpful. The WiKi is the one place to go to to get an explanation of components and how they work and its a bit of a let down when you can't run the examples because seeing is learning and DSP isn't the most intuitive of subjects.
Anyway your support is much appreciated.
Regards etc.

medelec35
Matrix Staff
Posts: 1966
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 629 times
Been thanked: 659 times

Re: DSP Band Pass Filter Wiki Eg not working

Post by medelec35 »

Hello.
I can't see an example on the DSP Rectifier page of the Wiki
If you downloaded FC_Comp_Source_DSP_Rectifier.fcfx then it's not meant to simulate.
It's purpose is to show how the component works as components are now free and open source.
If you are not referring to the component source, then if you attach the .fcfx file, then I will see what I can do.
Martin

canary_wharfe
Posts: 91
Joined: Thu Dec 10, 2020 3:54 pm
Has thanked: 6 times
Been thanked: 11 times

Re: DSP Band Pass Filter Wiki Eg not working

Post by canary_wharfe »

Hello Martin, yes I was meaning the FC_Comp_Source_DSP_Rectifier.fcfx file. Ok that's cleared that up.

Can I just get quick verification on your comment "The DSP components allow any microcontroller within reason to run DSP functions." Is the limitation re. the chip, then dependent on how maths intensive the program is? IOW if the program is very intensive then you really need to choose a chip with DSP hardware built in? If that is correct presumably when using 'real' dsp hardware the first thing to do inside the Flowcode project is set the 'Initialise' the DSP function? Right?
Other than the WiKi components help pages are there any other Flowcode links you know of re. starting with DSP? I had a good search on the forum but didn't find much. Tx again.

chipfryer27
Valued Contributor
Posts: 1575
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 357 times
Been thanked: 561 times

Re: DSP Band Pass Filter Wiki Eg not working

Post by chipfryer27 »

Hi

I can thoroughly recommend the Sysblocks https://www.matrixtsl.com/sysblocks/ if you want to learn about DSP. Pretty much self contained in that you don't need much else to follow along.

It has helped me immensly.

Regards

Post Reply