DSP Components - Learning from scratch

For general Flowcode discussion that does not belong in the other sections.
Post Reply
jay_dee
Posts: 197
http://meble-kuchenne.info.pl
Joined: Sun Dec 20, 2020 6:06 pm
Has thanked: 75 times
Been thanked: 54 times

DSP Components - Learning from scratch

Post by jay_dee »

Hi,
I decided to look at the DSP components again. I tried these when they first came out but got pretty confused.
I down loaded the delay example and it does not want to run. am I correct in the assumption that lots have changed since I last tried the DSP components?
I can't find the initialise component etc.. are there any good examples for begineers? :)

BenR
Matrix Staff
Posts: 1926
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 501 times
Been thanked: 684 times

Re: DSP Components - Learning from scratch

Post by BenR »

Hello,

I'm going through the wiki now and updating the examples to make them a bit more up to date and useful.

Here is the working delay example.
Delay.fcfx
(16.26 KiB) Downloaded 724 times
The data recorder window is great for visualising the DSP data and seeing what is happening in the chain.
DSP_Delay.jpg
DSP_Delay.jpg (44.96 KiB) Viewed 8197 times

jay_dee
Posts: 197
Joined: Sun Dec 20, 2020 6:06 pm
Has thanked: 75 times
Been thanked: 54 times

Re: DSP Components - Learning from scratch

Post by jay_dee »

Cheers Ben,
I played about and made a simple Lo Pass Filter, works well in sim and monitoring through the data recorder.
Got my head around the basics of linking the DSP components. So far..it certainly seems a cleaner approach, without setting ticks etc.
DSP_Filter_1.fcfx
Filter
(13.59 KiB) Downloaded 697 times
When using the filter a coefficient is set to define the intensity of the filter. Can this be set progmatically?
there is not a option in the component so maybe using handles or somthing? :)
J.

BenR
Matrix Staff
Posts: 1926
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 501 times
Been thanked: 684 times

Re: DSP Components - Learning from scratch

Post by BenR »

Hello,

Glad you're finding it easier and cleaner now.

I agree that adjustable coefficients would be useful. I can't see it being possible for the FIR and IIR filter but with the simpler ones it should be possible.

I'll get on it and see what I can do.

BenR
Matrix Staff
Posts: 1926
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 501 times
Been thanked: 684 times

Re: DSP Components - Learning from scratch

Post by BenR »

Ok should be there now :D

jay_dee
Posts: 197
Joined: Sun Dec 20, 2020 6:06 pm
Has thanked: 75 times
Been thanked: 54 times

Re: DSP Components - Learning from scratch

Post by jay_dee »

Hi, just tried sending to hardware.
Is this something silly my side or an effect of recent changes? :?

Code: Select all

I:\03 FLOWCODE\DSP Examples>C:\PROGRA~2\Flowcode\Common\COMPIL~1\picv2\batch\..\pic\bin\xc8.exe --chip=16F877A  "DSP_Filter_1.c" --MSGDISABLE=359,1273,1388 --FLOAT=32 --DOUBLE=32 
C:\PROGRA~2\Flowcode\Common\COMPIL~1\picv2\pic\bin\picc --chip=16F877A DSP_Filter_1.c --MSGDISABLE=359,1273,1388 --FLOAT=32 --DOUBLE=32
Microchip MPLAB XC8 C Compiler V2.10
Build date: Jul 30 2019
Part Support Version: 2.10
Copyright (C) 2019 Microchip Technology Inc.
DSP_Filter_1.c: FCD_0bc81_DSPFilter1__SetFilterCoefficient()
  1121:	FCV_0bc81_DSPFilter1__CV1 = FCL_VALUE;
	^ (192) undefined identifier "FCV_0bc81_DSPFilter1__CV1"
(908) exit status = 1
(908) exit status = 1

Error returned from [xc8.exe]

BenR
Matrix Staff
Posts: 1926
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 501 times
Been thanked: 684 times

Re: DSP Components - Learning from scratch

Post by BenR »

Hello,

Sorry that's my bug I'll get it sorted for you.

If you set the Variable Coefficients property to Yes then the error should go away.

jay_dee
Posts: 197
Joined: Sun Dec 20, 2020 6:06 pm
Has thanked: 75 times
Been thanked: 54 times

Re: DSP Components - Learning from scratch

Post by jay_dee »

Sorry Ben, tried the work around.
I get the same issue, irrespective of the variable coefficient setting.
J.

jay_dee
Posts: 197
Joined: Sun Dec 20, 2020 6:06 pm
Has thanked: 75 times
Been thanked: 54 times

Re: DSP Components - Learning from scratch

Post by jay_dee »

Thanks Ben and FC Team,
Componenet compiling to hardware when 'Variable Coefficents' is set to No. This allow me to continue playing with the DSP filters. Thanks. J.

BenR
Matrix Staff
Posts: 1926
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 501 times
Been thanked: 684 times

Re: DSP Components - Learning from scratch

Post by BenR »

Thanks again,

Problem now found and fixed.

Post Reply