Page 1 of 1

[solved] BUG in FLOWCODE 6.1.3.2 PWM in PIC16F1933 no work

Posted: Fri May 06, 2016 3:04 pm
by JustinS
I've created the same project using Flowcode 5.5 and Flowcode 6.1.2.0 and the PWM works correctly. The hex file is correct and the testing device works.
But using Flowcode 6.1.3.2 the PWM stops working.

I would ask you for quick help with this issue / bug.

Re: BUG in FLOWCODE 6.1.3.2 PWM in PIC16F1933 no work

Posted: Fri May 06, 2016 3:27 pm
by LeighM

Re: [solved] BUG in FLOWCODE 6.1.3.2 PWM in PIC16F1933 no w

Posted: Mon May 09, 2016 10:52 am
by JustinS
Thank you. But it didn't work :(

What did (The Solution):
1. I copied PIC_CAL_PWM.c from FlowCode 6.1.2.0.
2. Changed the definition and declaration of function FC_CAL_PWM_ChangePeriod_ from using MX_UINT8 for 'period' parameter to MX_UINT16. Otherwise it would not compile.

PS: I don't know if I didn't cause some other issues for myself in the future, but for now it works.

Re: [solved] BUG in FLOWCODE 6.1.3.2 PWM in PIC16F1933 no w

Posted: Mon May 09, 2016 3:10 pm
by LeighM
Thanks for letting us know you now have a solution.
I've tested the latest files in my 6.1.3.2 installation and all seems well.
So I’ve attached the latest PWM files, just in case you (or anyone else) wants to try these, if so replace all three.
The PIC_CAL_PWM.c file goes into (Flowcode 6 install directory)\CAL\PIC
The component files *.fcpx go into (Flowcode 6 install directory)\components
Probably best to move the old versions to a backup first.
Note: Do not just rename the old *.fcpx files in the install directory, Flowcode might still pick up the old version, as it uses a GUID to identify the components.

Re: [solved] BUG in FLOWCODE 6.1.3.2 PWM in PIC16F1933 no w

Posted: Wed Jun 08, 2016 8:44 am
by JustinS
Thank you for your solution. It works... but only for one PWM. When we added another one we started to get the following error during compilation:

pic16f1933_v6b.c(344): Illegal redefinition of symbol: MX_PWM_PERIOD

Re: [solved] BUG in FLOWCODE 6.1.3.2 PWM in PIC16F1933 no w

Posted: Wed Jun 08, 2016 9:34 am
by LeighM
Thanks for the spot.
try this update ..

Re: [solved] BUG in FLOWCODE 6.1.3.2 PWM in PIC16F1933 no w

Posted: Wed Jun 08, 2016 12:02 pm
by JustinS
Thank your for a quick replay. It compiles now :D