A problem with PIC18F26K22 / PIC18F46K22 with FC7 SOLVED!

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 7.

Moderator: Benj

Post Reply
User avatar
tiny
Posts: 200
Joined: Wed Jul 08, 2009 8:29 am
Has thanked: 51 times
Been thanked: 93 times
Contact:

A problem with PIC18F26K22 / PIC18F46K22 with FC7 SOLVED!

Post 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 298 times
Last edited by tiny on Fri Oct 21, 2016 8:08 pm, edited 1 time in total.

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: A problem with PIC18F26K22 / PIC18F46K22 with FC7

Post 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 366 times

User avatar
tiny
Posts: 200
Joined: Wed Jul 08, 2009 8:29 am
Has thanked: 51 times
Been thanked: 93 times
Contact:

Re: A problem with PIC18F26K22 / PIC18F46K22 with FC7

Post by tiny »

Thank you Benj for the fast problem solution!
Works great!

Christina

Post Reply