Page 1 of 1
16F18877 and ENC28J60
Posted: Sun Apr 09, 2017 1:52 pm
by EtsDriver
ENC is losing software defined pins after every load? Every time i load the file, the pins have changed to something else i had set up when saving?
Ive got following when saving:
C1=CS ENC
C3=SCK
C4=MISO
C5=MOSI
A3= ENC reset
After closing flowcode and opening it again:
CS ENC = C1
MISO = unconnected
MOSI =C2
RESET ENC= A3
Took the file download out as newer posted below.
Re: 16F18877 and ENC28J60
Posted: Mon Apr 10, 2017 2:56 pm
by Benj
Thanks for letting us know, hopefully the attached component will solve the problem for you.
This will also resolve the init waiting forever on a broken module problem you reported.
Simply copy the file into your "Flowcode 7/components" directory and restart Flowcode for the changes to be made.
Let me know how you get on.
Re: 16F18877 and ENC28J60
Posted: Mon Apr 10, 2017 6:10 pm
by EtsDriver
After applying update and trying to compile i now get error:
Code: Select all
C:\Program Files (x86)\Flowcode 7\CAL\PIC\PIC_CAL_SPI.c: FC_CAL_SPI_Master_Init_1()
173: tris |= (1 << (0));
^ (192) undefined identifier "tris"
190: SSPSTATbits.CKE = (((2) & 0x02))?1:0;
^ (192) undefined identifier "SSPSTATbits"
^ (196) struct/union required
191: SSPSTATbits.SMP = (((2) & 0x04))?1:0;
^ (196) struct/union required
C:\Program Files (x86)\Flowcode 7\CAL\PIC\PIC_CAL_SPI.c: FC_CAL_SPI_Master_Uninit_1()
217: tris |= (1 << (0));
^ (192) undefined identifier "tris"
C:\Program Files (x86)\Flowcode 7\CAL\PIC\PIC_CAL_SPI.c: FC_CAL_SPI_Master_Byte_1()
301: SSPBUF = DataOut;
^ (192) undefined identifier "SSPBUF"
302: while ((SSPSTAT & 0x01) == 0);
^ (192) undefined identifier "SSPSTAT"
(908) exit status = 1
(908) exit status = 1
C:\Program Files (x86)\Flowcode 7\compilers\pic\bin\xc8.exe reported error code 1
FINISHED
Re: 16F18877 and ENC28J60
Posted: Mon Apr 10, 2017 6:30 pm
by Benj
Ok thanks maybe the channel has not refreshed correctly. Maybe switch to a hw channel and back again to workaround and I'll investigate.
Re: 16F18877 and ENC28J60
Posted: Wed Apr 26, 2017 2:11 pm
by EtsDriver
Hi!
I think there is now a new bug there?
When trying to use HW channels, the code will not compile...
Code: Select all
C:\Program Files (x86)\Flowcode 7\compilers\pic\bin\xc8.exe --chip=16F18877 "SW_LEDTEST.c" --MSGDISABLE=359,1273,1388
Microchip MPLAB XC8 C Compiler (Free Mode) V1.41
Build date: Jan 24 2017
Part Support Version: 1.41
Copyright (C) 2017 Microchip Technology Inc.
License type: Node Configuration
SW_LEDTEST.c:
7410: #warning "This interrupt has previously been enabled, so the macro <tmr> may never get called."
^ (162) #warning: "This interrupt has previously been enabled, so the macro <tmr> may never get called." (warning)
C:\Program Files (x86)\Flowcode 7\CAL\PIC\PIC_CAL_SPI.c: FC_CAL_SPI_Master_Init_2()
190: SSPSTATbits.CKE = (((2) & 0x02))?1:0;
^ (192) undefined identifier "SSPSTATbits"
^ (196) struct/union required
191: SSPSTATbits.SMP = (((2) & 0x04))?1:0;
^ (196) struct/union required
C:\Program Files (x86)\Flowcode 7\CAL\PIC\PIC_CAL_SPI.c: FC_CAL_SPI_Master_Byte_2()
301: SSPBUF = DataOut;
^ (192) undefined identifier "SSPBUF"
302: while ((SSPSTAT & 0x01) == 0);
^ (192) undefined identifier "SSPSTAT"
(908) exit status = 1
(908) exit status = 1
C:\Program Files (x86)\Flowcode 7\compilers\pic\bin\xc8.exe reported error code 1
FINISHED
Re: 16F18877 and ENC28J60
Posted: Wed Apr 26, 2017 2:41 pm
by Benj
Thanks for letting us know,
The attached updated CAL file should solve the compilation error and let you use SPI hardware channel 1 on the device.
The file needs to be placed into the "Flowcode 7/CAL/PIC" folder.
Let me know how you get on.