After buying an HD44780 compatible LCD together with an I2C interface board (which has an PCF8574T soldered on it) I tried to output some text in C on it but the display just stayed black – or after changing some GPIOs, it stayed blue.
I measured every pin of the PCF8574T and got the following scheme:
PCF8574T <-> HD44780
P0 — RS
P1 — R/W
P2 — EN
P4 — DB4
P5 — DB5
P6 — DB6
P7 — DB7
R/W should be mapped to GND if the HD44780 should not talk back to the CPU. The information that was missing in the Ebay page, was that P3 must be also set to high or otherwise, there will be no backlight. Another obstacle was that the potentiometer wasn’t fully opened.
So here is my working example, thanks to very good documentation in the web and some lucky guesses.
#define LCDOFS(x) (lcdofs + x)
const int lcdofs = 0x64;
fd = lcdInit(4, 20, 4, LCDOFS(0), LCDOFS(2),
LCDOFS(4), LCDOFS(5), LCDOFS(6), LCDOFS(7), 0, 0, 0, 0);
lcdPrintf(fd, „Stay Tuned!“);
Here are some pictures of the display.
- HD44780 Display (20×4): 6,19 Euro
- I2C Interface Board: 1,10 Euro