Hi,
I have a problem compiling with FC7 of the PIC24FJ128GB610 micro.
The compiler returns me the error:
In file included from C:\Program Files (x86)\Flowcode 7\CAL\includes.c:69:0,
from PIC24FJ128GB610_Test.c:136:
C:\Program Files (x86)\Flowcode 7\CAL\/PIC16BIT\PIC16BIT_CAL_ADC.c: In function 'FC_CAL_ADC_Enable':
C:\Program Files (x86)\Flowcode 7\CAL\/PIC16BIT\PIC16BIT_CAL_ADC.c:70:3: error: 'AD1PCFG' undeclared (first use in this function)
C:\Program Files (x86)\Flowcode 7\CAL\/PIC16BIT\PIC16BIT_CAL_ADC.c:70:3: note: each undeclared identifier is reported only once for each function it appears in
C:\Program Files (x86)\Flowcode 7\CAL\/PIC16BIT\PIC16BIT_CAL_ADC.c:74:15: error: 'AD1CON2BITS' has no member named 'VCFG0'
C:\Program Files (x86)\Flowcode 7\CAL\/PIC16BIT\PIC16BIT_CAL_ADC.c:76:15: error: 'AD1CON2BITS' has no member named 'VCFG0'
C:\Program Files (x86)\Flowcode 7\CAL\/PIC16BIT\PIC16BIT_CAL_ADC.c: In function 'FC_CAL_ADC_Disable':
C:\Program Files (x86)\Flowcode 7\CAL\/PIC16BIT\PIC16BIT_CAL_ADC.c:116:3: error: 'AD1PCFG' undeclared (first use in this function)
Error returned from [xc16-gcc.exe]
Completed compilation, return = 1
C:\Program Files (x86)\Flowcode 7\compilers\pic16\batchfiles\pic16_C30_comp.bat ha riportato il codice di errore 1
Actually I also tried with other micro "FJ" family, always with the same error.
While with the family "HJ", I have no compile error.
what is the problem?
best regards
ADC Compiler error with FC7 on PIC24FJ family
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: ADC Compiler error with FC7 on PIC24FJ family
Hello,
I do not believe the PIC24FJ128GB610 device is currently supported by Flowcode 7 so I'm not sure where you've got this definition file from. I recently fixed this exact problem for Flowcode 8 so I've rolled the fix backwards into v7, it should hopefully work without any problems.
I've added the devices and ADC CAL fix to the v7 updated file here.
viewtopic.php?f=63&t=19743&p=89577
I do not believe the PIC24FJ128GB610 device is currently supported by Flowcode 7 so I'm not sure where you've got this definition file from. I recently fixed this exact problem for Flowcode 8 so I've rolled the fix backwards into v7, it should hopefully work without any problems.
I've added the devices and ADC CAL fix to the v7 updated file here.
viewtopic.php?f=63&t=19743&p=89577
Which other devices have you tried and I will test them here and see if I can replicate the issue.Actually I also tried with other micro "FJ" family, always with the same error.
While with the family "HJ", I have no compile error.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: ADC Compiler error with FC7 on PIC24FJ family
Hello Benj
Thank you for your reply.
I've already used your updates, that's why in FC7 I have PIC24FJ128GB610,
but the compiler returns me the error that I attached before.
I have a Microchip DM240001-3 development board with devices:
dsPIC33FJ256MC710A no error ADC
PIC24HJ256GP610A no error ADC
PIC24FJ1024GB610 error ADC
PIC24FJ256GB610 error ADC
PIC24FJ128GB610 error ADC
regards
Thank you for your reply.
I've already used your updates, that's why in FC7 I have PIC24FJ128GB610,
but the compiler returns me the error that I attached before.
I have a Microchip DM240001-3 development board with devices:
dsPIC33FJ256MC710A no error ADC
PIC24HJ256GP610A no error ADC
PIC24FJ1024GB610 error ADC
PIC24FJ256GB610 error ADC
PIC24FJ128GB610 error ADC
regards
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: ADC Compiler error with FC7 on PIC24FJ family
Hello,
The zip update includes a fix from today. Please re-download and apply the file and it should now solve these issues.
The zip update includes a fix from today. Please re-download and apply the file and it should now solve these issues.
PIC24FJ1024GB610 error ADC
PIC24FJ256GB610 error ADC
PIC24FJ128GB610 error ADC
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: ADC Compiler error with FC7 on PIC24FJ family
Hi
I have re-installed the files and everything works.
However, I believe there is an error in the configuration of the RA_H port of the micro PIC24HJ256GP610A: the RA_H4 and RA_H5 ports can not be activated.
Instead RE_H1 and RE_H2 can be activated, which do not exist in the micro data sheet.
I checked the file 24HJ256GP610A.fcdx in FCD and I think the error is:
line 187 <pin name = 'AN20 / INT1 / RE8' port = '4' bit = '8' adc = '20 '/>
line 188 <pin name = 'AN21 / INT2 / RE9' port = '4' bit = '9' adc = '21 '/>
I have modified in
line 187 <pin name = 'AN20 / INT1 / RA12' port = '0' bit = '12 'adc = '20' />
line 188 <pin name = 'AN21 / INT2 / RA13' port = '0' bit = '13 'adc = '21' />
So it seems to work ......
it's correct??
thank you very much for your support
I have re-installed the files and everything works.
However, I believe there is an error in the configuration of the RA_H port of the micro PIC24HJ256GP610A: the RA_H4 and RA_H5 ports can not be activated.
Instead RE_H1 and RE_H2 can be activated, which do not exist in the micro data sheet.
I checked the file 24HJ256GP610A.fcdx in FCD and I think the error is:
line 187 <pin name = 'AN20 / INT1 / RE8' port = '4' bit = '8' adc = '20 '/>
line 188 <pin name = 'AN21 / INT2 / RE9' port = '4' bit = '9' adc = '21 '/>
I have modified in
line 187 <pin name = 'AN20 / INT1 / RA12' port = '0' bit = '12 'adc = '20' />
line 188 <pin name = 'AN21 / INT2 / RA13' port = '0' bit = '13 'adc = '21' />
So it seems to work ......
it's correct??
thank you very much for your support
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: ADC Compiler error with FC7 on PIC24FJ family
Many thanks for letting me know.
Your suggested fix to the pin definition problem looks correct to me. I'll have a look and see which devices this effects and roll out a fix.
Edit, quite a few devices were effected - Now all fixed in the v8 update system and here for v7.
viewtopic.php?f=63&t=19743&p=89577#p89577
Your suggested fix to the pin definition problem looks correct to me. I'll have a look and see which devices this effects and roll out a fix.
Edit, quite a few devices were effected - Now all fixed in the v8 update system and here for v7.
viewtopic.php?f=63&t=19743&p=89577#p89577
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel