Discussion:
[lcd4linux] HD44780 I2C driver issue
Laurent HAAS
2014-04-07 14:22:57 UTC
Permalink
Hi all

I'm currently trying to use lcd4linux on a WR703N router with OpenWRT,
with a 20x4 HD44780 LCD equipped with an I2C interface.

Unfortunately, after several hours of struggle, I finally found that the
I2C integrated (soldered) interface - model YwRobot LCM1602 - is
finally not compatible with the plain HD44780-I2C driver :-( I got the
same behavior as the TRAC ticket #295 described.

These LCD + interfaces are sold by many vendors (mostly Chinese etc.)
and under several brands.

Actually, the 4 bits of data are assigned to the 4 HIGHER bits of the
"abstracted Port", and RS, RW, and EN are assigned to the LOWER bits :-(

Here is the corresponding table between the PCF8574 output pins and the LCD

PCF 8574 LCD
Pin Function Pin Function
4 P0 4 RS
5 P1 5 RW
6 P2 6 EN
7 P3 NC (backlight ?)
9 P4 11 D4
10 P5 12 D5
11 P6 13 D6
12 P7 14 D7
Michael Reinelt
2014-04-10 16:40:37 UTC
Permalink
Hello Laurent,

Although I never owned nor used a HD44780-i2c-display, I had a quick look at the sources: i2c should support
"Soft-Wiring", this menas you shouldbe able to specify the signals in lcd4linux.conf

But I don't know the syntax :-) just try some of the examples from the normal wiring, usind onnly DB0..DB7

try to strat lcd4linux with -fvv, ond look in the output for occurences like

info("%s: wiring: [DISPLAY:%s]<==>[i2c:DB%d]", Driver, name, w);

the soft-wiring code is in drv_generic_i2c.c, function
unsigned char drv_generic_i2c_wire(const char *name, const char *deflt)


good luck! :-)
Post by Laurent HAAS
Hi all
I'm currently trying to use lcd4linux on a WR703N router with OpenWRT,
with a 20x4 HD44780 LCD equipped with an I2C interface.
Unfortunately, after several hours of struggle, I finally found that the
I2C integrated (soldered) interface - model YwRobot LCM1602 - is
finally not compatible with the plain HD44780-I2C driver :-( I got the
same behavior as the TRAC ticket #295 described.
These LCD + interfaces are sold by many vendors (mostly Chinese etc.)
and under several brands.
Actually, the 4 bits of data are assigned to the 4 HIGHER bits of the
"abstracted Port", and RS, RW, and EN are assigned to the LOWER bits :-(
Here is the corresponding table between the PCF8574 output pins and the LCD
PCF 8574 LCD
Pin Function Pin Function
4 P0 4 RS
5 P1 5 RW
6 P2 6 EN
7 P3 NC (backlight ?)
9 P4 11 D4
10 P5 12 D5
11 P6 13 D6
12 P7 14 D7
Benjamin Fus
2014-04-12 17:09:02 UTC
Permalink
Hello Laurent,

did you have any success?
Post by Michael Reinelt
Hello Laurent,
Although I never owned nor used a HD44780-i2c-display, I had a quick look at the sources: i2c should support
"Soft-Wiring", this menas you shouldbe able to specify the signals in lcd4linux.conf
But I don't know the syntax :-) just try some of the examples from the normal wiring, usind onnly DB0..DB7
try to strat lcd4linux with -fvv, ond look in the output for occurences like
info("%s: wiring: [DISPLAY:%s]<==>[i2c:DB%d]", Driver, name, w);
the soft-wiring code is in drv_generic_i2c.c, function
unsigned char drv_generic_i2c_wire(const char *name, const char *deflt)
good luck! :-)
Post by Laurent HAAS
Hi all
I'm currently trying to use lcd4linux on a WR703N router with OpenWRT,
with a 20x4 HD44780 LCD equipped with an I2C interface.
Unfortunately, after several hours of struggle, I finally found that the
I2C integrated (soldered) interface - model YwRobot LCM1602 - is
finally not compatible with the plain HD44780-I2C driver :-( I got the
same behavior as the TRAC ticket #295 described.
These LCD + interfaces are sold by many vendors (mostly Chinese etc.)
and under several brands.
Actually, the 4 bits of data are assigned to the 4 HIGHER bits of the
"abstracted Port", and RS, RW, and EN are assigned to the LOWER bits :-(
Here is the corresponding table between the PCF8574 output pins and the LCD
PCF 8574 LCD
Pin Function Pin Function
4 P0 4 RS
5 P1 5 RW
6 P2 6 EN
7 P3 NC (backlight ?)
9 P4 11 D4
10 P5 12 D5
11 P6 13 D6
12 P7 14 D7
Loading...