This component provides useful access functions for the I2C-LCD1602 device, which is compatible with the HD44780 LCD controller. It uses a PCF8574A Remote 8-bit I/O Expander over the I2C bus, allowing the controller to be programmed via I2C using 4-bit mode.
It is written and tested for the ESP-IDF environment, version 2.1, using the xtensa-esp32-elf toolchain (gcc version 5.2.0).
Requires esp32-smbus.
An example of this component in use can be found at DavidAntliff/esp32-i2c-lcd1602-example.
- Supports 16x2 LCD modules commonly found on Ebay and AliExpress, via a PCF8574A I/O Expander over the I2C bus (4-bit mode).
- Backlight control.
- Supports dynamic and static allocation of device instance, with no global variables.
- Works with multiple displays (set unique I2C addresses for each device).
- Supports all HD44780-compatible features except for retrieval of data from the device.
- Provides some symbolic definitions for commmonly used characters (ROM Code A00: English/Asian character set).
Access to different types of LCD1602 modules is limited so this library may not work correctly (or at all) with your module. If that is the case, please file an issue and perhaps I can help you get it working.
Automatically generated API documentation (doxygen) is available here.
The source is available from GitHub.
The code in this project is licensed under the MIT license - see LICENSE for details.
- HD44780 datasheet
- PCF8574A Remote 8-bit I/O Expander for I2C Bus
- Espressif IoT Development Framework for ESP32
- Inspired by the Arduino DFRobot sample code.
- "SMBus" is a trademark of Intel Corporation.
- "I2C" is a registered trademark of Phillips Corporation.
The following features are anticipated but not yet implemented:
- Checking of Busy Flag for more efficient access.
- Retrieval of data from the device.
- ROM Code A02 symbolic definitions.
- Direct (parallel, no I2C) access via 4-bit and 8-bit modes.