Error in the SPI definition

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

Posts: 108
Joined: Sat Jul 03, 2010 4:38 pm
Been thanked: 2 times

Error in the SPI definition

Postby HjH » Sat Jul 30, 2011 10:18 pm


the controler is a 24FJ128GA010 on the explorer board.
I will write in a SPI EEPROM
The programm compiled with following errors:
Explorer_Test1.c: In function 'FCD_SPI_Legacy0_SPI_Init':
Explorer_Test1.c:990: error: 'SPI1CON' undeclared (first use in this function)
Explorer_Test1.c:990: error: (Each undeclared identifier is reported only once
Explorer_Test1.c:990: error: for each function it appears in.)
Explorer_Test1.c:991: error: 'SPI1CONbits' undeclared (first use in this function)

can you help me

Explorer_Test1 with error.fcf_pic16
(16.53 KiB) Downloaded 107 times

User avatar
Matrix Staff
Posts: 14567
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4598 times
Been thanked: 4239 times

Re: Error in the SPI definition

Postby Benj » Mon Aug 01, 2011 10:31 am


In your Project options -> Supplementary code window please add the following lines of code.

#define SPI1CON SPI1CON1
#define SPI1CONbits SPI1CON1bits

This should then let you compile correctly.