MIAC dsPIC - AV Input throwing error when compiling

For MIAC users to discuss projects, applications, and any other issues related to the MIAC unit.

Moderators: Benj, Mods

Post Reply
User avatar
Jay Dee
Posts: 398
Joined: Tue Aug 18, 2009 6:42 pm
Has thanked: 121 times
Been thanked: 154 times
Contact:

MIAC dsPIC - AV Input throwing error when compiling

Post by Jay Dee »

OK, so I'm just trying to read two pots into the MIAC and display them on the display. Work fine in sim but thorws a load of ADC related errors when it tried to pass it to the linker/assembler.
a sample of the errors I see is;

Code: Select all

: undefined reference to `_FC_CAL_ADC_Disable'
H:\01JLRP~1\REMOTE~1\FlowCode\MIAC_dsPIC_Control_Test.o(.text+0xda4): In function `_FCD_08f41_adc_base__RawDisable':
: undefined reference to `_FC_CAL_ADC_Disable'
H:\01JLRP~1\REMOTE~1\FlowCode\MIAC_dsPIC_Control_Test.o(.text+0xdb0): In function `_FCD_08f41_adc_base__GetByte':
: undefined reference to `_FC_CAL_ADC_Enable'
H:\01JLRP~1\REMOTE~1\FlowCode\MIAC_dsPIC_Control_Test.o(.text+0xdb4): In function `_FCD_08f41_adc_base__GetByte':
: undefined reference to `_FC_CAL_ADC_Sample'
H:\01JLRP~1\REMOTE~1\FlowCode\MIAC_dsPIC_Control_Test.o(.text+0xdb8): In function `_FCD_08f41_adc_base__GetByte':
: undefined reference to `_FC_CAL_ADC_Disable'

Error returned from [xc16-gcc.exe]

C:\Program Files (x86)\Flowcode 7\compilers\pic16\batchfiles\pic16_C30_link.bat reported error code 1
Somehow I'm not connecting the 'Pot' component correctly to the rest of the FC program.
I know i'm just missing something simple.
MIAC_dsPIC_Control_Test.fcfx
miac fc
(15.18 KiB) Downloaded 267 times

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: MIAC dsPIC - AV Input throwing error when compiling

Post by LeighM »

Hi,
The usual ADC pots cannot be used with MIAC,
You need to use the MIAC macros to input analog,
The analogue inputs window can be used during simulation.
Hope that helps,
Leigh

User avatar
Jay Dee
Posts: 398
Joined: Tue Aug 18, 2009 6:42 pm
Has thanked: 121 times
Been thanked: 154 times
Contact:

Re: MIAC dsPIC - AV Input throwing error when compiling

Post by Jay Dee »

Thanks Leigh,
I must confess, I've been using FC on/off for several years and have dropped MIACs into a few projects as they seem like a great quick fix.
However as constructive criticism, it does require a different approach and (unless i'm not looking in the right places) the user is left a bit stranded in working out how you go about building FC for the MIACs, when you've come the standard PIC method.. it all seems obvious when you used to these things but to noobs (even long time FC users) its not very obvious... just saying :)
I migh go as far as saying its a common theme, Generally the FC environment is very good but documentation on how to make the most of many features is...well, either hard to find or not available possibly. I must confess I still don't make great use the advanced features introduced in FC7 for exactly this reasons. It would be great to have some master classes that cover the some of these areas! :) I know you guys are busy but i had to just say my bit. :)
But Thanks again for the help, its much appreciated. J.

Post Reply