Newbie question - Unresolved External Function

Moderator: Benj

Post Reply
Flowcode v5 User
Posts: 1
Joined: Sat Jun 22, 2013 4:37 pm
Has thanked: 2 times

Newbie question - Unresolved External Function

Post 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 319 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 325 times
file compiles to Hex without problems.

Any suggestions please?

Thank you.

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

Re: Newbie question - Unresolved External Function

Post 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.

LightSwitch v1.2.fcf
(11 KiB) Downloaded 348 times

Post Reply