Flowcode for dsPIC - DSP Support Poll
Moderator: Benj
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Flowcode for dsPIC - DSP Support Poll
Hello,
Version 5 of Flowcode for dsPICs is currently under development and we are looking into adding certain DSP libraries into Flowcode in the form of DSP components.
Has anyone got any requests for DSP functionality?
If you can suggest a process and demonstrate how you would use it on an application or as a learning resource then what would it be and what hardware would it require?
We currently have an idea of what's possible and what we would like to provide but it's always good to get everyone's opinion before starting down a particular path.
Version 5 of Flowcode for dsPICs is currently under development and we are looking into adding certain DSP libraries into Flowcode in the form of DSP components.
Has anyone got any requests for DSP functionality?
If you can suggest a process and demonstrate how you would use it on an application or as a learning resource then what would it be and what hardware would it require?
We currently have an idea of what's possible and what we would like to provide but it's always good to get everyone's opinion before starting down a particular path.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Flowcode for dsPIC - DSP Support Poll
Ok no replies so far so I will give an example of what is possible.
Vector Operations - Path Finding / Games
Matrix Operations - Forward & Reverse Kinematics / Games / Automatic Mapping
Filtering Operations - FIR / IIR / Low Pass / High Pass / Band Pass
Transform Operations - FFT http://en.wikipedia.org/wiki/Fft
Window Operations - http://en.wikipedia.org/wiki/Window_function
This is by no means an exhaustive list so if you have suggestions for DSP then please let me know.
Vector Operations - Path Finding / Games
Matrix Operations - Forward & Reverse Kinematics / Games / Automatic Mapping
Filtering Operations - FIR / IIR / Low Pass / High Pass / Band Pass
Transform Operations - FFT http://en.wikipedia.org/wiki/Fft
Window Operations - http://en.wikipedia.org/wiki/Window_function
This is by no means an exhaustive list so if you have suggestions for DSP then please let me know.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Flowcode for dsPIC - DSP Support Poll
Ok i'll bite
although i dont use dspics at the moment i will in the future, will remappable pins be a function of flowcode

although i dont use dspics at the moment i will in the future, will remappable pins be a function of flowcode
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Flowcode for dsPIC - DSP Support Poll
Hello,
Good question. At the moment I have kinda swept this under the carpet and put in hard coded remapped pins as part of the code abstraction layer.
We may be able to do something different regarding this. Eg we could have the remapping specified as part of the FCD file. This way you could clone the FCD file and modify the remap and then you can choose the different target in the project options target list for the different hardcoded remaps.
Of course allowing remaps to take place via Flowcode's interface would be much better so I will see what can be done here. So far I have not really been able to think of a way of doing this without having to rewrite part of the Flowcode executable code.
Good question. At the moment I have kinda swept this under the carpet and put in hard coded remapped pins as part of the code abstraction layer.
We may be able to do something different regarding this. Eg we could have the remapping specified as part of the FCD file. This way you could clone the FCD file and modify the remap and then you can choose the different target in the project options target list for the different hardcoded remaps.
Of course allowing remaps to take place via Flowcode's interface would be much better so I will see what can be done here. So far I have not really been able to think of a way of doing this without having to rewrite part of the Flowcode executable code.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 714
- Joined: Wed Jan 31, 2007 12:41 pm
- Has thanked: 1 time
- Been thanked: 26 times
Re: Flowcode for dsPIC - DSP Support Poll
Hello Benj
Have V5 vor ds-pic a support for the new "dsPIC33EP256MU814" "PIC24EPXXX(GP/GU)810/814 "(all xxE types up to 70mips)?
Regards Wolfgang
Have V5 vor ds-pic a support for the new "dsPIC33EP256MU814" "PIC24EPXXX(GP/GU)810/814 "(all xxE types up to 70mips)?
Regards Wolfgang
- petesmart
- Valued Contributor
- Posts: 395
- Joined: Thu May 06, 2010 11:42 am
- Location: Sydney, Australia
- Has thanked: 187 times
- Been thanked: 140 times
Re: Flowcode for dsPIC - DSP Support Poll
Ok... I will bite as well...
I would like to have tools to implement kalman filters - Multi axis a must 3DOF - 5DOF.. This is for the filtering of gyros and accelerometers, noise management etc..
Ideally the ability to deal with matrices would be very useful..As you mentioned..
Ben, you may remember that I sent you some info via a PM.. I can dig it out and post again if that helps..
Kalman filters are brilliant for robots and autonomous control..
Thanks for the question..
All the best
Pete
I would like to have tools to implement kalman filters - Multi axis a must 3DOF - 5DOF.. This is for the filtering of gyros and accelerometers, noise management etc..
Ideally the ability to deal with matrices would be very useful..As you mentioned..
Ben, you may remember that I sent you some info via a PM.. I can dig it out and post again if that helps..
Kalman filters are brilliant for robots and autonomous control..
Thanks for the question..
All the best
Pete
sorry about that Chief!
- BChappy
- Posts: 15
- Joined: Fri Jun 19, 2009 11:03 pm
- Location: Lincoln, UK.
- Has thanked: 13 times
- Been thanked: 7 times
Re: Flowcode for dsPIC - DSP Support Poll
Hello Ben,
I would be interested in;
Filtering Operations: Lo. Hi Pass filters etc... particularly if the audio DAC features were available as a component macro to full resolution.
Matrix operations: Kinematics for robotics apps. etc.
Thanks for asking
Brian
I would be interested in;
Filtering Operations: Lo. Hi Pass filters etc... particularly if the audio DAC features were available as a component macro to full resolution.
Matrix operations: Kinematics for robotics apps. etc.
Kalman Filters sound interesting!petesmart wrote: I would like to have tools to implement kalman filters - Multi axis a must 3DOF - 5DOF.. This is for the filtering of gyros and accelerometers, noise management etc...

Thanks for asking
Brian
Is your Project Not Working? - Help and General Advice Click here!
Flowcode v8 forum topic - Click here!
Flowcode v8 forum topic - Click here!
Re: Flowcode for dsPIC - DSP Support Poll
Hello
good to hear that a Version 5 of dsPIC is on it''s way.
Something I would like to see is that the dsPIC is brought up to the same standard as the 8 bit version in funcionality. It would be good if better support for the 30F601_A series could be supported. It seeams as there are still problems in getting components that uses internal registers in the chip are not working very well sometimes. So far I had problems with the EEPROM and the CAN components.
Also it would be good to have full and tested support for the latest E-Block moduls like the EB076 since that kkind of E-Blocks could realy benefit from the speed and the size of the memory in the 16-bit PICS.
good to hear that a Version 5 of dsPIC is on it''s way.
Something I would like to see is that the dsPIC is brought up to the same standard as the 8 bit version in funcionality. It would be good if better support for the 30F601_A series could be supported. It seeams as there are still problems in getting components that uses internal registers in the chip are not working very well sometimes. So far I had problems with the EEPROM and the CAN components.
Also it would be good to have full and tested support for the latest E-Block moduls like the EB076 since that kkind of E-Blocks could realy benefit from the speed and the size of the memory in the 16-bit PICS.
Re: Flowcode for dsPIC - DSP Support Poll
Hello
an usefull addition to the current CAN component would be a macro that changed the speed of the CAN bus as you can change the baudrate in the upgraded RS232 component in FC 5.
an usefull addition to the current CAN component would be a macro that changed the speed of the CAN bus as you can change the baudrate in the upgraded RS232 component in FC 5.
-
- Posts: 209
- Joined: Thu Oct 19, 2006 11:46 am
- Location: Bakewell, UK
- Has thanked: 20 times
- Been thanked: 16 times
Re: Flowcode for dsPIC - DSP Support Poll
A Fourier transform routine would be very useful,
Also matrix and matrix manipulation features would be very useful.
Also can it be made as a 'bolt on' to Flowcode 5 rather than a seperate product. Buying two
full packages (or at least updating them) is onerous and they are also out of sync. I have given up
on dsPIC Fcode as it is frustrating when faced with not being able to use Flowcode 5 options,
even for example documentation options etc. etc.
Thanks,
Mark
ps a Kalman filter feature would certainly be of interest.
Also matrix and matrix manipulation features would be very useful.
Also can it be made as a 'bolt on' to Flowcode 5 rather than a seperate product. Buying two
full packages (or at least updating them) is onerous and they are also out of sync. I have given up
on dsPIC Fcode as it is frustrating when faced with not being able to use Flowcode 5 options,
even for example documentation options etc. etc.
Thanks,
Mark
ps a Kalman filter feature would certainly be of interest.
Go with the Flow.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Flowcode for dsPIC - DSP Support Poll
Hello Mark,
Thanks for the input.
We have now moved on with this a little and have a better idea of what is going to happen.
Thanks for the input.
We have now moved on with this a little and have a better idea of what is going to happen.
This is already in the mix as a FFT and also an inverse FFT to convert back to the time domain.A Fourier transform routine would be very useful,
Agreed, I will think up a way to get this in.Also matrix and matrix manipulation features would be very useful.
Yes our current intention is to add this to v5 for the dsPIC product and maybe to the other v5 products too. If not then it should be part of v6.Also can it be made as a 'bolt on' to Flowcode 5 rather than a seperate product. Buying two
full packages (or at least updating them) is onerous and they are also out of sync.
We have a v5 beta for dsPIC available now for download, there are still lots of problems with the more advanced components so not recommended for most users but if interested then contact DavidA for details. Also if you sign up for this then you should also get access to the DSP document explaining what we are planning.I have given up on dsPIC Fcode as it is frustrating when faced with not being able to use Flowcode 5 options, even for example documentation options etc. etc.
I will try and work out a way to do this using the DSP bits and pieces, Kalman filters are certainly a popular topic at the moment.ps a Kalman filter feature would certainly be of interest.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 41
- Joined: Thu Oct 16, 2008 11:01 am
- Has thanked: 21 times
- Been thanked: 7 times
Re: Flowcode for dsPIC - DSP Support Poll
Benj
This is off-topic but may have general relevance. I have noticed that the PIC chip list for Flowcode 5 includes advanced 64/80 pin TQFP chips like the 18F87K22. What board supports their programming? Could I also use that board to access the two similar 80 pin TQFP chips Microchip make that have a two channel 16/24bit ADC - the 18F87J22 and 18F86J22? If not could I request that your next upgrade of F5 includes these two chips. There are a lot of non-audio tasks that require a 16/24bit analogue range, which is not currently catered for.
This is off-topic but may have general relevance. I have noticed that the PIC chip list for Flowcode 5 includes advanced 64/80 pin TQFP chips like the 18F87K22. What board supports their programming? Could I also use that board to access the two similar 80 pin TQFP chips Microchip make that have a two channel 16/24bit ADC - the 18F87J22 and 18F86J22? If not could I request that your next upgrade of F5 includes these two chips. There are a lot of non-audio tasks that require a 16/24bit analogue range, which is not currently catered for.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Flowcode for dsPIC - DSP Support Poll
Hello Richard,
Sorry for the delay in replying to you. I will try and get these devices into the next update release but it really depends on if they are supported by the BoostC compiler by then. BoostC are normally quite quick at supporting new devices so I don't see this being an issue.
Hello Beambase,
We are due to begin beta testing soon and I think the current plan is to release it in around a month near the start of October. We have added a lot of functionality to it and I am currently going through it with a fine tooth comb to make sure we eliminate as many bugs as possible.
Sorry for the delay in replying to you. I will try and get these devices into the next update release but it really depends on if they are supported by the BoostC compiler by then. BoostC are normally quite quick at supporting new devices so I don't see this being an issue.
Hello Beambase,
We are due to begin beta testing soon and I think the current plan is to release it in around a month near the start of October. We have added a lot of functionality to it and I am currently going through it with a fine tooth comb to make sure we eliminate as many bugs as possible.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 155
- Joined: Sat Mar 28, 2009 5:44 pm
- Location: LYON FRANCE
- Has thanked: 3 times
- Been thanked: 41 times
Re: Flowcode for dsPIC - DSP Support Poll
Hello,
I have the flowcode dspicV5.
I am looking for the FFT functions but I can't find it.
Is it still under developpment or ready to use hiden somewhere I can't find.
If you have a beta version. Can I test it.
Thank you
Regards
I have the flowcode dspicV5.
I am looking for the FFT functions but I can't find it.
Is it still under developpment or ready to use hiden somewhere I can't find.
If you have a beta version. Can I test it.
Thank you
Regards
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Flowcode for dsPIC - DSP Support Poll
Hello,
We decided to delay the DSP components until Feb next year so we could make it better and get more functionality in there. I will let you know when we have something in the form of a Beta that can be played with.
We decided to delay the DSP components until Feb next year so we could make it better and get more functionality in there. I will let you know when we have something in the form of a Beta that can be played with.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 155
- Joined: Sat Mar 28, 2009 5:44 pm
- Location: LYON FRANCE
- Has thanked: 3 times
- Been thanked: 41 times
Re: Flowcode for dsPIC - DSP Support Poll
Thank you
Do you have some links to documents on how to perform a FFT with dsPIC.
My colleague need it quickly so he will try to do it in C or manual calculation.
You should have some news from him here...
Do you have some links to documents on how to perform a FFT with dsPIC.
My colleague need it quickly so he will try to do it in C or manual calculation.
You should have some news from him here...
Re: Flowcode for dsPIC - DSP Support Poll
thank you benp,
we really need this FFT component. We are planing to use it to detect biological signals, in
human body. We hope to control a car with this component only with mind.
We are doing this with an hospital near lyon (france) and if you had a beta version it would be
quite usefull to try it.
we really need this FFT component. We are planing to use it to detect biological signals, in
human body. We hope to control a car with this component only with mind.
We are doing this with an hospital near lyon (france) and if you had a beta version it would be
quite usefull to try it.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Flowcode for dsPIC - DSP Support Poll
I have some FFT code which I can pass to you quickly but im now out of the office until tomorrow.
Is this ok or should I ask a collegue to dig out the file for me so you can have example C code today?
Is this ok or should I ask a collegue to dig out the file for me so you can have example C code today?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Flowcode for dsPIC - DSP Support Poll
it will be really nice to have a FFT code, I think I can wait untill tommrow
thanks.

thanks.

- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Flowcode for dsPIC - DSP Support Poll
Hello,
This is the FFT function I have so far. I've had it partially working but it needs a few minor tweaks etc to get it stable.
This is the FFT function I have so far. I've had it partially working but it needs a few minor tweaks etc to get it stable.
Code: Select all
void DSP_FFT(MX_STRING Real, MX_UINT8 MSZ_Real, MX_STRING Imaginary, MX_UINT8 MSZ_Imaginary)
{
MX_SINT32 mr = 0, i, j, l, k, c, istep, shift;
MX_SINT16 qr, qi, tr, ti, wr, wi, b, m;
m = FFT_SAMPLE_POWER;
// decimation in time - re-order data
for (m = 1; m <= FFT_SAMPLE_CNTM1; ++m)
{
l = FFT_SAMPLE_COUNT;
do
{
l >>= 1;
} while (mr+l > FFT_SAMPLE_CNTM1);
mr = (mr & (l-1)) + l;
if (mr <= m) continue;
tr = Real[m];
Real[m] = Real[mr];
Real[mr] = tr;
ti = Imaginary[m];
Imaginary[m] = Imaginary[mr];
Imaginary[mr] = ti;
}
l = 1;
k = LOG2_N_WAVE-1;
while (l < n)
{
istep = l << 1;
for (m=0; m<l; ++m)
{
j = m << k;
// 0 <= j < N_WAVE/2
wr = Sinewave[j + (FFT_N_WAVE / 4)];
wi = -Sinewave[j];
wr >>= 1;
wi >>= 1;
for (i=m; i<n; i+=istep)
{
j = i + l;
// Here I unrolled the multiplications to prevent overhead
// for procedural calls (we don't need to be clever about
// the actual multiplications since the pic has an onboard
// 8x8 multiplier in the ALU):
// tr = FIX_MPY(wr,fr[j]) - FIX_MPY(wi,fi[j]);
c = ((long int)wr * (long int)Real[j]);
c = c >> 14;
b = c & 0x01;
tr = (c >> 1) + b;
c = ((long int)wi * (long int)Imaginary[j]);
c = c >> 14;
b = c & 0x01;
tr = tr - ((c >> 1) + b);
// ti = FIX_MPY(wr,fi[j]) + FIX_MPY(wi,fr[j]);
c = ((long int)wr * (long int)Imaginary[j]);
c = c >> 14;
b = c & 0x01;
ti = (c >> 1) + b;
c = ((long int)wi * (long int)Real[j]);
c = c >> 14;
b = c & 0x01;
ti = ti + ((c >> 1) + b);
qr = Real[i];
qi = Imaginary[i];
qr >>= 1;
qi >>= 1;
Real[j] = qr - tr;
Imaginary[j] = qi - ti;
Real[i] = qr + tr;
Imaginary[i] = qi + ti;
}
}
--k;
l = istep;
}
}
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 155
- Joined: Sat Mar 28, 2009 5:44 pm
- Location: LYON FRANCE
- Has thanked: 3 times
- Been thanked: 41 times
Re: Flowcode for dsPIC - DSP Support Poll
Hello Benj,
Maybe I am wrong but the C30 compiler is supposed to have the FFT library included.
See here:
http://www.microchip.com/stellent/idcpl ... e=en023598
Why don't you use this one in flowcode?
I didn't find more doc but it is supposed to be in:
C:\Program Files\Microchip\MPLAB C30\docs\dsp_lib
If you have the C30 installed in MPLAB (I don't)
Can someone find more info about this?
Maybe I am wrong but the C30 compiler is supposed to have the FFT library included.
See here:
http://www.microchip.com/stellent/idcpl ... e=en023598
Why don't you use this one in flowcode?
I didn't find more doc but it is supposed to be in:
C:\Program Files\Microchip\MPLAB C30\docs\dsp_lib
If you have the C30 installed in MPLAB (I don't)
Can someone find more info about this?
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Flowcode for dsPIC - DSP Support Poll
Hello,
The library included as part of the C30 compiler is officially for benchmarking chips only and appears from my personal testing plus the comments of other users to be full of bugs. Therefore we have developed our own DSP routines which are not reliant on the Microchip library. The upside to this is that the new DSP components should be compatible with all Flowcode variants not just the 16-bit PICs.
The library included as part of the C30 compiler is officially for benchmarking chips only and appears from my personal testing plus the comments of other users to be full of bugs. Therefore we have developed our own DSP routines which are not reliant on the Microchip library. The upside to this is that the new DSP components should be compatible with all Flowcode variants not just the 16-bit PICs.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Flowcode for dsPIC - DSP Support Poll
HI Benj,
For my project, I will use a Discret Fourier Transformation.
I've made an excel File to make Calculations in order to test what I have with flowcode.
I hope, it can help you to try quick Calculations.
the FFT is a DFT and the cooley Tukey (FFT) is also a DFT.
Yann
For my project, I will use a Discret Fourier Transformation.
I've made an excel File to make Calculations in order to test what I have with flowcode.
I hope, it can help you to try quick Calculations.
the FFT is a DFT and the cooley Tukey (FFT) is also a DFT.
Yann
- Attachments
-
- fft7.zip
- (72.96 KiB) Downloaded 845 times