Page 1 of 1

A problem with PIC18F26K22 / PIC18F46K22 with FC7 SOLVED!

Posted: Wed Oct 19, 2016 10:23 pm
by tiny
Hi, I am using an SPI Card Reader (Micro SD Card) with a PIC18F26K22 and PIC18F46K22.
Channel 1 is used for I2C, channel 2 is for SPI.
Both channels work without problems in FC6.
SPI on channel 1 is working, the following error message occurs in channel 2:

----------------------------------------------------------------------------------------------------------
Start des Compilers...
C:\Program Files (x86)\Flowcode 7\compilers\pic\bin\xc8.exe --chip=18F26K22 "2. Create_File_v6.c" --MSGDISABLE=359,1273,1388
Microchip MPLAB XC8 C Compiler (PRO Mode) V1.38
Build date: Jun 30 2016
Part Support Version: 1.38
Copyright (C) 2016 Microchip Technology Inc.
License type: Node Configuration

C:\Program Files (x86)\Flowcode 7\CAL\PIC\PIC_CAL_SPI.c: FC_CAL_SPI_Master_Init_1()
195: SSP2CON = 2 & 0x03;
^ (192) undefined identifier "SSP2CON"
196: SSP2CONbits.CKP = (((2) & 0x01))?1:0;
^ (192) undefined identifier "SSP2CONbits"
^ (196) struct/union required
199: SSP2CONbits.SSPEN = 1;
^ (196) struct/union required
C:\Program Files (x86)\Flowcode 7\CAL\PIC\PIC_CAL_SPI.c: FC_CAL_SPI_Master_Uninit_1()
211: SSP2CON = 0;
^ (192) undefined identifier "SSP2CON"
C:\Program Files (x86)\Flowcode 7\CAL\PIC\PIC_CAL_SPI.c: FC_CAL_SPI_SetPrescaler_1()
331: SSP2CONbits.SSPEN = 0;
^ (192) undefined identifier "SSP2CONbits"
^ (196) struct/union required
332: SSP2CON = SSP2CON & 0xFC;
^ (192) undefined identifier "SSP2CON"
334: SSP2CONbits.SSPEN = 1;
^ (196) struct/union required
(908) exit status = 1
(908) exit status = 1

C:\Program Files (x86)\Flowcode 7\compilers\pic\bin\xc8.exe Hat den Fehlercode 1 gemeldet

BEENDET
----------------------------------------------------------------------------------------------------------

Can someone please look at this?

Thanks!
Christina
2. Create_File_v6.fcfx
(12.83 KiB) Downloaded 337 times

Re: A problem with PIC18F26K22 / PIC18F46K22 with FC7

Posted: Thu Oct 20, 2016 10:07 am
by Benj
Hi Christina,

Many thanks for letting us know. I have now found and fixed the problem.

Simply copy the attached CAL file into your "Flowcode 7/CAL/PIC" folder and the issue should be resolved.
PIC_CAL_SPI.c
(12.64 KiB) Downloaded 405 times

Re: A problem with PIC18F26K22 / PIC18F46K22 with FC7

Posted: Thu Oct 20, 2016 11:07 am
by tiny
Thank you Benj for the fast problem solution!
Works great!

Christina