Page 1 of 1

(Solved) SW on RE3 error on 18F26K20

Posted: Sat Mar 01, 2014 1:28 pm
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!

Re: SW on RE3 error on 18F26K20

Posted: Sat Mar 01, 2014 9:22 pm
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"

(Solved) SW on RE3 error on 18F26K20

Posted: Sat Mar 01, 2014 9:43 pm
by bercioiu
Thank you very much sire!
Everything seems to be OK now!
I have a hex :-)