I am stunned that there hasn't been some solid examples posted.
posted 8 years ago
https://support.melabs.com/forum/pic...f8574-20x4-lcd

two versions covering popular variants of i2c backpack [LCD_PCF8574.pbp and LCD_PCF8574a.pbp]

Name:  s-l1600.jpg
Views: 7150
Size:  146.4 KB

bought one

verified address a0 a1 a2 not grounded therefore $4e
verified lcd data pins on PCF8574 high nibble therefore LCD_PCF8574a.pbp
adjusted Test_LCD_PCF8574.pbp to siut

;----[Setup LCD using PCF8574 Port Expander]------------------------------------
LCD_Addr CON $4e ; A0, A1, A2 tied to ground
INCLUDE "LCD_PCF8574a.pbp" ; Include LCD module for PCF8574
Backlight = 1 ; Turn on LCD Backlight

worked first go



what more could you want


Name:  lcd.jpg
Views: 6916
Size:  83.0 KB