Page 1 of 1

PIC18F26K40 I2C LCD not working

Posted: Mon Aug 06, 2018 11:38 am
by radist73
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!

Re: PIC18F26K40 I2C LCD not working

Posted: Mon Aug 06, 2018 8:27 pm
by gdt
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

Re: PIC18F26K40 I2C LCD not working

Posted: Tue Aug 07, 2018 12:18 pm
by radist73
It is just 26K40 problem, with 2620 and 26K22 both displays works fine!

Re: PIC18F26K40 I2C LCD not working

Posted: Wed Aug 08, 2018 12:10 pm
by Benj
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?

Re: PIC18F26K40 I2C LCD not working

Posted: Fri Aug 10, 2018 2:59 pm
by radist73
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!

Re: PIC18F26K40 I2C LCD not working

Posted: Sun Aug 19, 2018 8:41 pm
by TaliG
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).

Re: PIC18F26K40 I2C LCD not working

Posted: Mon Aug 20, 2018 8:45 am
by gdt
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

Re: PIC18F26K40 I2C LCD not working

Posted: Wed Aug 22, 2018 10:36 am
by TaliG
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