Migration from PIC18F26K22 to PIC18F26K42

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

Moderator: Benj

Post Reply
User avatar
AbhijitR
Posts: 298
Joined: Fri Nov 07, 2014 12:48 pm
Location: Pune, India
Has thanked: 279 times
Been thanked: 78 times
Contact:

Migration from PIC18F26K22 to PIC18F26K42

Post by AbhijitR »

Hello!

In the past i was using PIC18F26K22 and everything was working well in FC8, recently i migrated to PIC18F26K42 for 12bit ADC, only changing the chip in Project Options did not work, there are so many new settings :?: , i tried few settings but nothing is working, i am getting below error while compiling, can someone explain me where can i go wrong or do i need to start the project all new instead of Save As, i think this is something to do with port settings, is it?
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC\PIC_CAL_I2C.c: FC_CAL_I2C_Master_Init_1()
266: SSP1DATPPS = 0;
^ (192) undefined identifier "SSP1DATPPS"
269: SSP1CLKPPS = 3;
^ (192) undefined identifier "SSP1CLKPPS"
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC\PIC_CAL_I2C.c: FC_CAL_I2C_Slave_Init_1()
661: SSP1DATPPS = 0;
^ (192) undefined identifier "SSP1DATPPS"
663: SSP1CLKPPS = 3;
^ (192) undefined identifier "SSP1CLKPPS"
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC\PIC_CAL_UART.c: FC_CAL_UART_Init_1()
551: INTCON0bits.PEIE = 1;
^ (255) not a member of the struct/union ""
^ (182) illegal conversion between types
int -> volatile union S2036
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC\PIC_CAL_UART.c: FC_CAL_UART_Uninit_1()
908: PIE1bits.RCIE = 0;
^ (255) not a member of the struct/union ""
^ (182) illegal conversion between types
int -> volatile union S151
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC\PIC_CAL_UART.c: FC_CAL_UART_UpdateBaud_1()
1564: PIE1bits.RCIE = 1;
^ (255) not a member of the struct/union ""
^ (182) illegal conversion between types
int -> volatile union S151
1565: INTCON0bits.PEIE = 1;
^ (255) not a member of the struct/union ""
^ (182) illegal conversion between types
int -> volatile union S2036
TLIC_18F26K22_OLED_CI_4R_15-01-2021.c: default_isr()
19387: if ((PIR4bits.TMR3IF) && (PIE4bits.TMR3IE))
^ (255) not a member of the struct/union ""
^ (255) not a member of the struct/union ""
(199) logical type required ^
(199) logical type required ^
19390: PIR4bits.TMR3IF = 0;
^ (255) not a member of the struct/union ""
^ (182) illegal conversion between types
int -> volatile union S188
19403: if ((PIR1bits.RCIF) && (PIE1bits.RCIE))
^ (255) not a member of the struct/union ""
^ (255) not a member of the struct/union ""
TLIC_18F26K22_OLED_CI_4R_15-01-2021.c: 19403: too many errors (21)
(908) exit status = 1
(908) exit status = 1
Error returned from [xc8.exe]
C:\Program Files (x86)\Flowcode\Common\Compilers\pic\batch\pic_xc8_comp.bat reported error code 1
can someone shed some light on this, thank you

Abhi

User avatar
AbhijitR
Posts: 298
Joined: Fri Nov 07, 2014 12:48 pm
Location: Pune, India
Has thanked: 279 times
Been thanked: 78 times
Contact:

Re: Migration from PIC18F26K22 to PIC18F26K42

Post by AbhijitR »

Hello!

Few updates, i noticed the I2C channel was not selected, which i did now, to software, there was no hardware selection like 18F26K22, but now there is no error for I2C, later i deleted all the macros and component for MODBUS slave, the UART error is gone, no doubt there is no component so i hope the error is gone, now one more error is remaining, below, i do not understand the meaning of this error, can someone help.

(kindly ignore the chip number in the first line, i have selected 18F26K42 in the project,)
TLIC_18F26K22_OLED_CI_4R_15-01-2021.c: default_isr()
15885: if ((PIR4bits.TMR3IF) && (PIE4bits.TMR3IE))
^ (255) not a member of the struct/union ""
^ (255) not a member of the struct/union ""
(199) logical type required ^
(199) logical type required ^
15888: PIR4bits.TMR3IF = 0;
^ (255) not a member of the struct/union ""
^ (182) illegal conversion between types
int -> volatile union S188
(908) exit status = 1
(908) exit status = 1

Error returned from [xc8.exe]
thank you

Abhi

User avatar
AbhijitR
Posts: 298
Joined: Fri Nov 07, 2014 12:48 pm
Location: Pune, India
Has thanked: 279 times
Been thanked: 78 times
Contact:

Re: Migration from PIC18F26K22 to PIC18F26K42

Post by AbhijitR »

Hello!

One more update, compilation was done, i noticed one Interrupt TM3 was created in the chart and was disabled, i deleted that too and compilation was done.

Abhi

User avatar
AbhijitR
Posts: 298
Joined: Fri Nov 07, 2014 12:48 pm
Location: Pune, India
Has thanked: 279 times
Been thanked: 78 times
Contact:

Re: Migration from PIC18F26K22 to PIC18F26K42

Post by AbhijitR »

Hello! Ben

May i request you to help me understand why there is no selection available for the channel (channel1, channel2) for the I2C display (gLCD_SH1106_I2C1), only option available is software, kindly correct me if i am wrong, but on software channel (RC3, RC4) the display works really very slow, why i am sure because the same display worked well on PIC18F26K22.

Can you also correct me, if the display is on software mode (RC3, RC4) is there any probability it will run slow, because on K22 chip i was running the display on 64MHz (16MHz crystal + 4PLL), and i tried to do the same on K42 chip but without success.

One small observation i also added the 1Sec delay for one of the LED right at the beginning of the main loop, the LED switch ON and OFF quite well, after this switching the display macro etc., in this case the first blink works well (more or less 1sec) and then it takes a long time to flash again, i suppose because of the display macros, so i disabled all the display macros and checked, now the blink looks correct.

I think this is something to do with the display channel, can you help.

Thank you.

Abhi

User avatar
AbhijitR
Posts: 298
Joined: Fri Nov 07, 2014 12:48 pm
Location: Pune, India
Has thanked: 279 times
Been thanked: 78 times
Contact:

Re: Migration from PIC18F26K22 to PIC18F26K42

Post by AbhijitR »

Hello! Ben

I notice all the I2C components is having only software channel selection for the PIC18F26K42 chip.

The gLCD_SH1106_SPI is having the channel1 and software selection but gLCD_SH1106_I2C1 is having only software.

I hope this will help.

Abhi

User avatar
AbhijitR
Posts: 298
Joined: Fri Nov 07, 2014 12:48 pm
Location: Pune, India
Has thanked: 279 times
Been thanked: 78 times
Contact:

Re: Migration from PIC18F26K22 to PIC18F26K42

Post by AbhijitR »

Hello! Ben
good morning

Any advise on the I2C display or do you think i am making some mistake in setting the clock to 64MHz, the project option from build is so different then K22 chip, the I2C display works well on 64MHz on the K22 chip.

Abhi

User avatar
AbhijitR
Posts: 298
Joined: Fri Nov 07, 2014 12:48 pm
Location: Pune, India
Has thanked: 279 times
Been thanked: 78 times
Contact:

Re: Migration from PIC18F26K22 to PIC18F26K42

Post by AbhijitR »

Hello! Ben
good morning

Any advise for me, or do you think it is not possible to select hardware channel for I2C display, or should i drop the idea of using I2C display, kindly do the needful.

Abhi

Post Reply