Page 1 of 1

Newbie question - Unresolved External Function

Posted: Sat Jun 22, 2013 4:55 pm
by davecatt
Hi all,

I've just purchased Flowcode v5 and am playing about testing my legs. I'm getting the following error when I try to compile lightswitch v1
LightSwitch v1.fcf
(10 KiB) Downloaded 318 times
to Hex:

Error: Unresolved external function:'FC_CAL_Port_In_DDR__x(unsigned char*,unsigned char*,unsigned char,unsigned char)'

No compiler options have been altered by me (just the chip config) so as far as I'm concerned any automatic linked external files should still be valid. I've searched the forums and had posts pointing to the compiler directives becoming mismatched but can't see anything I can do.

To make matters a bit more confusing (or perhaps clearer), the lightswitch v1.1
LightSwitch v1.1.fcf
(10.5 KiB) Downloaded 323 times
file compiles to Hex without problems.

Any suggestions please?

Thank you.

Re: Newbie question - Unresolved External Function

Posted: Sat Jun 22, 2013 6:52 pm
by medelec35
H David,
I have altered your flowchart to toggle LED every time switch is pressed and released.
Debounce has been included, but flowchart will need revisiting if you decide to use any other interrupts as it's not normally recommended to have any delays within interrupt macros. Since while within interrupt macro (ISR), all other interrupts are disabled until ISR is exited.
One issue you will have is interrupt macro witll be activated when swich is pressed (change from 0 to 1) and again when switch is released (change from 1 to 0)
Since its a interrupt on port change.
So in effect your LED would go on when switch is pressed and go back off when switch is released since interrupt macro was in effect assessed twice!

Not sure why issue is there with $PORTA.5 = 0 I will leave that for someone else to answer.
I can say it's also not recommended to keep enabling interrupt.
They only require enabling once only.
Unless you use a disable interrupt after, then it will need to be enabled again.

Martin.