(Solved) SW on RE3 error on 18F26K20

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
bercioiu
Posts: 161
Joined: Sun Feb 25, 2007 10:56 am
Location: bucharest, romania
Has thanked: 90 times
Been thanked: 34 times
Contact:

(Solved) SW on RE3 error on 18F26K20

Post by bercioiu »

I`m working at a project with 18F26K20 and I use all the pins. Mean while, I need another pin and the only pin available is RE3. I set internal MCLR and if I compile, it return me the following error:

" SW.c(217:2): error: unknown identifier 'trise'
SW.c(217:2): error: invalid operand 'trise'
SW.c(217:8): error: failed to generate expression "

Here are the lines in "C":

" //Input
//Input: E3 -> SW
trise = trise | 0x08;
FCV_SW = ((porte & 0x08) == 0x08); "

I still cant attach files (*FCF) on that forum (don`t know why...)

How can I resolve this situation?

Thank you!
Last edited by bercioiu on Sat Mar 01, 2014 9:44 pm, edited 1 time in total.

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: SW on RE3 error on 18F26K20

Post by kersing »

Edit the file 18F26K20.fcd (found in the FCD folder of your Flowcode installation).

Find the line:

Code: Select all

InputCmdOneBit="tris%p = tris%p | %m;\n%o = ((port%p & %m) == %m);\n"
Replace with:

Code: Select all

InputCmdOneBit="#if '%p' != 'e'\n tris%p = tris%p | %m;\n#endif\n%o = ((port%p & %m) == %m);\n"
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

bercioiu
Posts: 161
Joined: Sun Feb 25, 2007 10:56 am
Location: bucharest, romania
Has thanked: 90 times
Been thanked: 34 times
Contact:

(Solved) SW on RE3 error on 18F26K20

Post by bercioiu »

Thank you very much sire!
Everything seems to be OK now!
I have a hex :-)

Post Reply