- Name : HD44780_LCD
- Description :
- Library to support the HD44780 LCD , (I2C PCF8574 "backpack" interface) for the Raspberry PI and other linux based SBC.
- Dynamic install-able system level C++ library.
- Backlight, scroll, cursor and entrymode control.
- Custom character support + print class for numerical data.
- Hardware I2C
- Dependency: lgpio Library
- Tested on size 16x02 and 20x04 (but may work on other sizes eg 16x04 , untested)
- Author: Gavin Lyons
Connections
- LCD SCLK = SCLK1 I2C pins P1-05 GPIO3
- LCD SDA = SDA1 I2C pins P1-03 GPIO2
Hardware I2C.
- I2C Address is set by default to 0x27(your module could be different, user can change argument passed into LCD class constructor). LCD_I2C_FLAGS No flags are currently defined. This parameter should be set to zero. The value to set LCD_I2C_DEVICE, can be found by running command, to view available I2C device numbers
i2cdetect -l
- I2C Clock rate is set by device installed on. During development and testing on raspberry pi 5 it was found that by default the baudrate was set to 100,000 baud. By modifying the file /boot/firmware/config.txt baud can be increased
param=i2c_arm=on,i2c_arm_baudrate=400000
- In the event of an error writing a byte, debug info with error code will be written to console. Debug flag must be set to true to see this output. User can set error timeout between retry attempts and number of retry attempts and can monitor the Error flag.
User can turn on debug messages with LCDDebugSet method see example file.
Filepath | File Function | Screen Size |
---|---|---|
TEST_16x02 | Carries out test sequence testing features | 16x02 |
TEST_20x04 | Carries out test sequence testing features | 20x04 |
CLOCK_16x02 | A basic clock Demo | 16x02 |
TEST_I2C_16x02 | Check I2C connection | 16x02 |
Output of custom character test in test file.
20x04 display.
-
For detailed graphical description of entry modes , cursor types, custom characters and more see here link
-
16X04 board not tested but should work