ADC doesn't compile with 24FJ256DA210

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
Mathy
Posts: 333
Joined: Mon Oct 05, 2009 2:39 pm
Has thanked: 30 times
Been thanked: 33 times

ADC doesn't compile with 24FJ256DA210

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

User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Re: ADC doesn't compile with 24FJ256DA210

Post by Jan Lichtenbelt »

Try to change in the FDC file:
Initialise=""
by
Initialise="AD1PCFG = 0xffff;\n"


Kind regards

Jan Lichteneblt

Mathy
Posts: 333
Joined: Mon Oct 05, 2009 2:39 pm
Has thanked: 30 times
Been thanked: 33 times

Re: ADC doesn't compile with 24FJ256DA210

Post by Mathy »

Hello Jan,

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

User avatar
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 doesn't compile with 24FJ256DA210

Post by Benj »

Hell Mathy,

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

#define AD1PCFG AD1PCFGL

Mathy
Posts: 333
Joined: Mon Oct 05, 2009 2:39 pm
Has thanked: 30 times
Been thanked: 33 times

Re: ADC doesn't compile with 24FJ256DA210

Post 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

Mathy
Posts: 333
Joined: Mon Oct 05, 2009 2:39 pm
Has thanked: 30 times
Been thanked: 33 times

Re: ADC doesn't compile with 24FJ256DA210

Post by Mathy »

any help ?

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

Re: ADC doesn't compile with 24FJ256DA210

Post by Steve »

please post your FCF and C files and we'll have a look.

Post Reply