Page 1 of 1

ADC(1) on 18F26K22 doesn't compile

Posted: Sun Oct 09, 2011 4:27 pm
by Brian Walsh
When I try to use ADC(1) my program fails with the following message.

4ch_no_con_mon.c(1378:23): error: unknown identifier 'VCFG0'
4ch_no_con_mon.c(1378:23): error: invalid operand 'VCFG0'
4ch_no_con_mon.c(1378:18): error: failed to generate expression
4ch_no_con_mon.c(1378:18): error: invalid operand '<<'
4ch_no_con_mon.c(1378:12): error: failed to generate expression
4ch_no_con_mon.c success

failure

......
Return code = 1

ADC(0), ADC(2) and ADC(3) compile ok.

Any ideas guys?

Brian Walsh.

Re: ADC(1) on 18F26K22 doesn't compile

Posted: Sun Oct 09, 2011 5:58 pm
by medelec35
Hi Brian,
I tried a simple flowchart using ADC0 to ADC2 and it compiled for me just fine.
adc1 issue.png
(120.08 KiB) Downloaded 2136 times
Are you using the latest flowcode V4.5.18.74?

If your flowchart is not commercially sensitive, then if you don't mind posting it, I can see if I can get it to compile.

Martin

Re: ADC(1) on 18F26K22 doesn't compile

Posted: Tue Oct 11, 2011 4:15 pm
by Brian Walsh
HI Martin,

I have written a simple program reading ADC(0) - ADC(3) and it compiles. So the problem with my original program must lie elsewhere. Thanks for your help.

Brian Walsh.

Re: ADC(1) on 18F26K22 doesn't compile

Posted: Tue Oct 11, 2011 5:03 pm
by medelec35
Hi Brian, the information you have posted e.g 4ch_no_con_mon.c(1378:23): error: unknown identifier 'VCFG0'
The number within brackets is the line of C code that’s causing the issue.
If you would like to track down the culprit, have a read of this:
http://www.matrixmultimedia.com/mmforum ... =26&t=6936

scroll down to:
C) General use of Flowcode.

If you need help in tracking down the cause of error then just ask (you will need to either upload flwowchart, or send in a pm if private.

As a guess there is a component has not been assigned with correct data or just left blank?

Martin

Re: ADC(1) on 18F26K22 doesn't compile

Posted: Wed Oct 12, 2011 8:25 am
by Steve
I did a search for "VCFG0" in the component C code and it seems to be used in the ADC component when an external VREF is selected. Further inspection shows that the k22 family does not define the VCFG0 - instead NVCFG0, NVCFG1, PVCFG0 and PVCFG1 are defined.

This affects the PIC_ADC_19.c and PIC_ADC_29.c files. I'll try to get a fix up later today.

Re: ADC(1) on 18F26K22 doesn't compile

Posted: Sun Jan 29, 2012 6:50 pm
by benp
I still have the error:
unknown identifier 'VCFG0'
I downloaded the fix here:
http://www.matrixmultimedia.com/mmforum ... =29&t=8700
Do you have a solution?

Re: ADC(1) on 18F26K22 doesn't compile

Posted: Sun Jan 29, 2012 7:51 pm
by medelec35
Hi Ben,
Take a look here:
http://www.matrixmultimedia.com/mmforum ... 700#p31874
I added fix today.

That should solve your issue :)

Martin