Page 1 of 2
DSP Band Pass Filter Wiki Eg not working
Posted: Mon Jan 27, 2025 11:47 pm
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?
Re: DSP Band Pass Filter Wiki Eg not working
Posted: Tue Jan 28, 2025 8:18 am
by medelec35
Hello.
Thank you for letting us know.
I will have a look and see what I can do.
Re: DSP Band Pass Filter Wiki Eg not working
Posted: Tue Jan 28, 2025 12:31 pm
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.
Re: DSP Band Pass Filter Wiki Eg not working
Posted: Tue Jan 28, 2025 1:58 pm
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
Re: DSP Band Pass Filter Wiki Eg not working
Posted: Tue Jan 28, 2025 6:01 pm
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?
Re: DSP Band Pass Filter Wiki Eg not working
Posted: Tue Jan 28, 2025 9:21 pm
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.
Re: DSP Band Pass Filter Wiki Eg not working
Posted: Tue Jan 28, 2025 11:58 pm
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.
Re: DSP Band Pass Filter Wiki Eg not working
Posted: Wed Jan 29, 2025 8:44 am
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.
Re: DSP Band Pass Filter Wiki Eg not working
Posted: Wed Jan 29, 2025 4:32 pm
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.
Re: DSP Band Pass Filter Wiki Eg not working
Posted: Wed Jan 29, 2025 4:46 pm
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