ADC(1) on 18F26K22 doesn't compile

Moderator: Benj

Post Reply
Brian Walsh
Posts: 29
Joined: Thu Jan 14, 2010 10:43 pm
Has thanked: 3 times
Contact:

ADC(1) on 18F26K22 doesn't compile

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

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

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

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

Brian Walsh
Posts: 29
Joined: Thu Jan 14, 2010 10:43 pm
Has thanked: 3 times
Contact:

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

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

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

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

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

User avatar
Steve
Matrix Staff
Posts: 3418
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

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

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

benp
Posts: 155
Joined: Sat Mar 28, 2009 5:44 pm
Location: LYON FRANCE
Has thanked: 3 times
Been thanked: 41 times
Contact:

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

Post 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?
Regards
INSA 1er cycle GCP projects with or without eblocks:
http://www.youtube.com/user/INSAgcp

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

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

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

Post Reply