Closed EAGrahamJr closed 1 year ago
Finally found the "real" data-sheet for the device in question.
I’ll take a look this week. Confused as to what it actually is and how it is different to what is already implemented. Freenove is just a company packaging these things. Could be as simple as a variant, eg the I2C backpack (PCF8574AT?).
Freenove is just a company packaging these things. Could be as simple as a variant, eg the I2C backpack (PCF8574AT?).
Concur - this has been driving me a little crazy (and why I've left it as a "draft"). I've varied almost all parts of the backpack interaction, but the code here is the only way I've managed to get it to work, between the existing code versus the supplied code from Freenove and from the Pi4J "examples".
FYI, this is the constructor I used new HD44780Lcd(new PCF8574LcdConnection(1), 16, 2);
$ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- 27 -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
I've ordered a 4-line display with the same backpack configuration. The Amazon page touts this as a "new version", so I'm supposing there's a difference in the backpack itself (since there's no controls).
Still confused - everything points to these being the Hitachi displays, but using the existing HD44780 device is not currently working with these particular devices. (Time to start capturing byte sequences...)
The GH1602-2502 is a super-low-cost 2 line display. This has apparently been included in several "experimenter kits" and uses slightly different bit-commands than the
HD44780
.The
LcdInterface
andLcdConnection
interfaces/classes were extracted to share across LCD implementations.