PIC18F26K40 I2C LCD not working

A forums to allow bugs and problems with Flowcode v7 to be reported and resolved.

Moderator: Benj

radist73
Posts: 36
Joined: Mon Dec 22, 2014 10:04 pm
Location: TALLINN
Has thanked: 5 times
Been thanked: 2 times
Contact:

PIC18F26K40 I2C LCD not working

Postby radist73 » Mon Aug 06, 2018 11:38 am

Hi,
I have tryed to add i2c lcd with i2c address 63 to the board with pic18f26k40. After adding component and adding LCD Start macto program cant starting, 1 sec status led not working.
If i replace controller to PIC18F2620 in same board with same hardware and some program (only edit target) program works fine and lcd initialized.
If I delete LCDStart macro from 26K40 flowchart, program will start.
I think, it will be any bug in component or target code.
Just have installed last FC7 updates at 18.07.2018, but problem not solved.
I need to use 26k40, because need two UARTs for RTX and GPS.

PS. SSD1306 I2C OLED display have the same problem! After Initialize command program will crash. Seems as common i2c trouble in 26k40 chip component

Please help.
Thank you!

gdt
Posts: 71
Joined: Thu Aug 10, 2017 2:04 pm
Has thanked: 25 times
Been thanked: 36 times
Contact:

Re: PIC18F26K40 I2C LCD not working

Postby gdt » Mon Aug 06, 2018 8:27 pm

Hello,
I've used some SSD1306 display with PIC16F26K80 and it works. Attach your basic flowchart so everybody can try to see if anything wrong.
Regards
Giuseppe

radist73
Posts: 36
Joined: Mon Dec 22, 2014 10:04 pm
Location: TALLINN
Has thanked: 5 times
Been thanked: 2 times
Contact:

Re: PIC18F26K40 I2C LCD not working

Postby radist73 » Tue Aug 07, 2018 12:18 pm

It is just 26K40 problem, with 2620 and 26K22 both displays works fine!

User avatar
Benj
Matrix Staff
Posts: 14150
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4330 times
Been thanked: 4078 times
Contact:

Re: PIC18F26K40 I2C LCD not working

Postby Benj » Wed Aug 08, 2018 12:10 pm

Hello,

Could it be something specific in your program. Can you attach a simple program that is exhibiting the problem.

Have you tried the 1 second flasher test?

Also have you tried using a different I2C channel?

Do you have external pull up resistors on the I2C signals?

radist73
Posts: 36
Joined: Mon Dec 22, 2014 10:04 pm
Location: TALLINN
Has thanked: 5 times
Been thanked: 2 times
Contact:

Re: PIC18F26K40 I2C LCD not working

Postby radist73 » Fri Aug 10, 2018 2:59 pm

Hello,
Just have tested again and result is: only Software i2c start working. If I choose Channel1, program will crash.
Will use Software i2c! :D
Yes, i have pull-up resistors and always put into program 1sec tmr flasher led.

Thanks for advice!

TaliG
Posts: 27
Joined: Fri Apr 07, 2017 1:55 am
Location: Greece
Has thanked: 10 times
Been thanked: 8 times
Contact:

Re: PIC18F26K40 I2C LCD not working

Postby TaliG » Sun Aug 19, 2018 8:41 pm

Hardware i2c and spi never worked on any 18FxxK40 devices.
software works fine as it is "software''.
Also on 18F67K40 you cannot print string values on an alphanumeric lcd connected using either 4 or 8bit mode (no i2c or spi).

gdt
Posts: 71
Joined: Thu Aug 10, 2017 2:04 pm
Has thanked: 25 times
Been thanked: 36 times
Contact:

Re: PIC18F26K40 I2C LCD not working

Postby gdt » Mon Aug 20, 2018 8:45 am

Hello,
I've used 18LF26K80 with SH1106 display on I2C CH1 and it works. I cannot say anything regarding xxK40 devices however I remember I had to play with Baud speed for I2C comms and the chip speed.
In my case I enabled the internal PLL to run the PIC at 64MHz and the I2C baud speed at 400KHz.
What are your settings?

Regards
Giuseppe

TaliG
Posts: 27
Joined: Fri Apr 07, 2017 1:55 am
Location: Greece
Has thanked: 10 times
Been thanked: 8 times
Contact:

Re: PIC18F26K40 I2C LCD not working

Postby TaliG » Wed Aug 22, 2018 10:36 am

Hi,
sorry for late reply.

on the 47k40 I used external 20mhz oshilator without PLL.
also tried the internal oschilator with no luck.

In anycase, I moved all my projects on a EB091 and im so huppy i do not think I will ever go back to 8bits again :)

Regards
George