Problem programming PIC16F1824

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
paulm
Posts: 36
Joined: Mon Mar 28, 2011 9:37 pm

Problem programming PIC16F1824

Post by paulm »

Hi Ben,

I have attached a file which I previously used to program a PIC16F1824 about 1 year ago. At the time I was using an older version of Flowcode (I can't remember what version it was at the time) and I had to edit the compiler that was used to use HiTech. I am now using Flowcode v4.5.18.74 and it seems to be pointing to the "boostc" compiler (boostc_pic16_flowcode.exe).

Can you tell me if this version of flowcode when using the "boostc" compiler is compatible with the PIC16F1824 chip?

I am getting an error message, shown below, when I try to program the PIC16F1824 chip with the same program that previously worked (see attached program).

Can you please instruct me how I can program the PIC16F1824 chip by getting around this error?

Rgds,
Paul

PID_1824.c
Starting preprocessor: c:\PROGRA~2\MATRIX~1\FLOWCO~1\boostc\pp.exe PID_1824.c -i c:\PROGRA~2\MATRIX~1\FLOWCO~1\boostc\include -d _PIC16F1824 -la -c2 -o PID_1824.pp -v -d _BOOSTC -d _PIC16 -d _PIC16x -d _CHAR_INDEX


............

PID_1824.c(1507): error: left operand must be l-value
PID_1824.c(1507:9): error: failed to generate expression
PID_1824.c(1692:16): warning: expression was optimized out
PID_1824.c(1693:16): warning: expression was optimized out
PID_1824.c success

failure

Return code = 1

Flowcode was unable to compile the flowchart's C code due to the following errors:


If your flowchart contains C code, please review this carefully. If your flowchart contains no C-code or you have thoroughly reviewed the code, contact Technical Support.

FINISHED
Attachments
PID_1824.fcf
(21.67 KiB) Downloaded 282 times

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: Problem programming PIC16F1824

Post by medelec35 »

Hi Paul,
first two lines are caused by:
#define option_reg OPTION_REG
in your supplementary code window.
You need to go to View, Options then un-select use supplementary code.

As for the last two messages they are caused by:
Setpoint1 = Setpoint1
Setpoint2 = Setpoint2

If setpoint1 is 150 then its a waste of time assigning it with the same value.
This is because what ever value setpoint1 before the calculation is, it will remain the same after the calculation.
BoostC thinks the calculation is pointless so it removes it, hence

Code: Select all

PID_1824.c(1692:16): warning: expression was optimized out
PID_1824.c(1693:16): warning: expression was optimized out  
Hope this helps

I have also move this topic to Flowcode V4 since Programming Tips & Tricks section is unsuitable in asking for support

Martin
Martin

paulm
Posts: 36
Joined: Mon Mar 28, 2011 9:37 pm

Re: Problem programming PIC16F1824

Post by paulm »

Thanks a mil Martin. That seems to have done the trick.

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: Problem programming PIC16F1824

Post by medelec35 »

That's great.
Glad it's sorted.
Thanks for letting us know
Martin

Post Reply