Page 1 of 1

ADC doesn't compile with 24FJ256DA210

Posted: Mon Nov 21, 2011 4:07 pm
by Mathy
Hello,

Impossible to compile if I use ADC :

Flowcode1.c: In function 'FCD_SPI_Legacy3_FramOutput':
Flowcode1.c:976: warning: implicit declaration of function 'SPI_Byte'
Flowcode1.c: In function 'FCD_ADC0_SampleADC':
Flowcode1.c:2555: error: 'AD1PCFG' undeclared (first use in this function)
Flowcode1.c:2555: error: (Each undeclared identifier is reported only once
Flowcode1.c:2555: error: for each function it appears in.)
Flowcode1.c: In function 'FCD_ADC1_SampleADC':
Flowcode1.c:2677: error: 'AD1PCFG' undeclared (first use in this function)
Flowcode1.c: In function 'FCD_ADC2_SampleADC':
Flowcode1.c:2799: error: 'AD1PCFG' undeclared (first use in this function)
Flowcode1.c: In function 'FCD_ADC3_SampleADC':
Flowcode1.c:2921: error: 'AD1PCFG' undeclared (first use in this function)
Flowcode1.c: In function 'FCD_ADC4_SampleADC':
Flowcode1.c:3043: error: 'AD1PCFG' undeclared (first use in this function)
Flowcode1.c: In function 'FCM_SCROLL':
Flowcode1.c:3237: warning: passing argument 5 of 'FCI_CONCATENATE' discards qualifiers from pointer target type
Flowcode1.c:3243: warning: passing argument 1 of 'FCI_GETLENGTH' discards qualifiers from pointer target type
Flowcode1.c:3259: warning: passing argument 1 of 'FCI_MIDSTRING' discards qualifiers from pointer target type
Flowcode1.c:3259: warning: passing argument 3 of 'FCI_MIDSTRING' discards qualifiers from pointer target type
Flowcode1.c:3269: warning: passing argument 1 of 'FCD_LCDDisplay0_PrintString' discards qualifiers from pointer target type
Flowcode1.c: In function 'FCM_DETECTION_BOUTONS':
Flowcode1.c:3588: warning: suggest parentheses around comparison in operand of &

Error returned from [pic30-gcc.exe]


Can you fix this pb ?

Re: ADC doesn't compile with 24FJ256DA210

Posted: Tue Nov 22, 2011 6:12 pm
by Jan Lichtenbelt
Try to change in the FDC file:
Initialise=""
by
Initialise="AD1PCFG = 0xffff;\n"


Kind regards

Jan Lichteneblt

Re: ADC doesn't compile with 24FJ256DA210

Posted: Wed Nov 23, 2011 3:26 pm
by Mathy
Hello Jan,

Thank you for the tips but I doesn't compile again :(

Re: ADC doesn't compile with 24FJ256DA210

Posted: Wed Nov 23, 2011 6:27 pm
by Benj
Hell Mathy,

You could try adding this line of C code to your supplementary code window.

#define AD1PCFG AD1PCFGL

Re: ADC doesn't compile with 24FJ256DA210

Posted: Thu Dec 01, 2011 11:54 am
by Mathy
Hi,

Impossible to compile again :

RIG 3D V 1.0.c: In function 'FCD_SPI_Legacy3_SPI_Get_Char':
RIG 3D V 1.0.c:1024: warning: no return statement in function returning non-void
RIG 3D V 1.0.c: In function 'FCD_SPI_Legacy3_NVM_Get_Char':
RIG 3D V 1.0.c:1042: warning: no return statement in function returning non-void
RIG 3D V 1.0.c: In function 'FCD_SPI_Legacy3_FramOutput':
RIG 3D V 1.0.c:1048: warning: no return statement in function returning non-void
RIG 3D V 1.0.c: In function 'FCD_SPI_Legacy4_SPI_Get_Char':
RIG 3D V 1.0.c:1463: warning: no return statement in function returning non-void
RIG 3D V 1.0.c: In function 'FCD_SPI_Legacy4_NVM_Get_Char':
RIG 3D V 1.0.c:1481: warning: no return statement in function returning non-void
RIG 3D V 1.0.c: In function 'FCD_SPI_Legacy4_FramOutput':
RIG 3D V 1.0.c:1487: warning: no return statement in function returning non-void
RIG 3D V 1.0.c: In function 'FCD_ADC0_SampleADC':
RIG 3D V 1.0.c:2440: error: 'AD1PCFGL' undeclared (first use in this function)
RIG 3D V 1.0.c:2440: error: (Each undeclared identifier is reported only once
RIG 3D V 1.0.c:2440: error: for each function it appears in.)
RIG 3D V 1.0.c: In function 'FCD_ADC1_SampleADC':
RIG 3D V 1.0.c:2562: error: 'AD1PCFGL' undeclared (first use in this function)
RIG 3D V 1.0.c: In function 'FCD_ADC2_SampleADC':
RIG 3D V 1.0.c:2684: error: 'AD1PCFGL' undeclared (first use in this function)
RIG 3D V 1.0.c: In function 'FCD_ADC3_SampleADC':
RIG 3D V 1.0.c:2806: error: 'AD1PCFGL' undeclared (first use in this function)
RIG 3D V 1.0.c: In function 'FCD_ADC4_SampleADC':
RIG 3D V 1.0.c:2928: error: 'AD1PCFGL' undeclared (first use in this function)
RIG 3D V 1.0.c: In function 'FCD_SPI_Legacy5_SPI_Get_Char':
RIG 3D V 1.0.c:3425: warning: no return statement in function returning non-void
RIG 3D V 1.0.c: In function 'FCD_SPI_Legacy5_NVM_Get_Char':
RIG 3D V 1.0.c:3443: warning: no return statement in function returning non-void
RIG 3D V 1.0.c: In function 'FCD_SPI_Legacy5_FramOutput':
RIG 3D V 1.0.c:3449: warning: no return statement in function returning non-void
RIG 3D V 1.0.c: In function 'FCD_RS2320_ReceiveRS232Char':
RIG 3D V 1.0.c:3618: warning: unused variable 'count'
RIG 3D V 1.0.c:3617: warning: unused variable 'idx'
RIG 3D V 1.0.c: In function 'FCM_BOUTONS_ENCODEURS':
RIG 3D V 1.0.c:4012: warning: suggest parentheses around comparison in operand of &
RIG 3D V 1.0.c: In function 'FCM_INVERSEURS':
RIG 3D V 1.0.c:4846: warning: suggest parentheses around comparison in operand of &
RIG 3D V 1.0.c:5020: warning: suggest parentheses around comparison in operand of &
RIG 3D V 1.0.c:5178: warning: suggest parentheses around comparison in operand of &
RIG 3D V 1.0.c: In function 'main':
RIG 3D V 1.0.c:6888: error: 'AD1PCFGL' undeclared (first use in this function)

I have an other problem with this chip too. I have no access to all pin.
RC1 is missing.

thank you for making the necessary,

Mathy

Re: ADC doesn't compile with 24FJ256DA210

Posted: Wed Dec 07, 2011 11:36 am
by Mathy
any help ?

Re: ADC doesn't compile with 24FJ256DA210

Posted: Wed Dec 07, 2011 12:03 pm
by Steve
please post your FCF and C files and we'll have a look.