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

A forums to allow bugs and problems with Flowcode v6 to be reported and resolved.

Moderator: Benj

JustinS
Flowcode v5 User
Posts: 34
Joined: Wed Sep 12, 2012 1:59 pm
Has thanked: 1 time
Been thanked: 7 times
Contact:

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

Postby JustinS » Fri May 06, 2016 3:04 pm

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.
Attachments
pic16f1933_v6.fcfx
Flovcode 6.1.3.2
(3.34 KiB) Downloaded 157 times
Last edited by JustinS on Mon May 09, 2016 10:43 am, edited 1 time in total.

User avatar
LeighM
Matrix Staff
Posts: 1845
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 429 times
Been thanked: 612 times
Contact:

Re: BUG in FLOWCODE 6.1.3.2 PWM in PIC16F1933 no work

Postby LeighM » Fri May 06, 2016 3:27 pm


JustinS
Flowcode v5 User
Posts: 34
Joined: Wed Sep 12, 2012 1:59 pm
Has thanked: 1 time
Been thanked: 7 times
Contact:

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

Postby JustinS » Mon May 09, 2016 10:52 am

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.

User avatar
LeighM
Matrix Staff
Posts: 1845
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 429 times
Been thanked: 612 times
Contact:

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

Postby LeighM » Mon May 09, 2016 3:10 pm

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.
Attachments
PWM.fcpx
(7.82 KiB) Downloaded 169 times
cal_pwm.fcpx
(8.23 KiB) Downloaded 142 times
PIC_CAL_PWM.c
(14.75 KiB) Downloaded 246 times
These users thanked the author LeighM for the post:
medelec35 (Wed Jun 08, 2016 11:48 am)
Rating: 5.56%
 

JustinS
Flowcode v5 User
Posts: 34
Joined: Wed Sep 12, 2012 1:59 pm
Has thanked: 1 time
Been thanked: 7 times
Contact:

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

Postby JustinS » Wed Jun 08, 2016 8:44 am

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
Attachments
pic16f1933_v6b.fcfx
(5.87 KiB) Downloaded 92 times

User avatar
LeighM
Matrix Staff
Posts: 1845
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 429 times
Been thanked: 612 times
Contact:

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

Postby LeighM » Wed Jun 08, 2016 9:34 am

Thanks for the spot.
try this update ..
Attachments
cal_pwm.fcpx
(8.22 KiB) Downloaded 112 times
These users thanked the author LeighM for the post:
medelec35 (Wed Jun 08, 2016 11:49 am)
Rating: 5.56%
 

JustinS
Flowcode v5 User
Posts: 34
Joined: Wed Sep 12, 2012 1:59 pm
Has thanked: 1 time
Been thanked: 7 times
Contact:

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

Postby JustinS » Wed Jun 08, 2016 12:02 pm

Thank your for a quick replay. It compiles now :D