Page 1 of 1

Error in the SPI definition

Posted: Sat Jul 30, 2011 10:18 pm
by HjH
Hallo,

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 294 times

Re: Error in the SPI definition

Posted: Mon Aug 01, 2011 10:31 am
by Benj
Hello,

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.