DavidAntliff / esp32-i2c-lcd1602

ESP32-compatible C library for LCD1602 display via I2C backpack.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

esp32-i2c-lcd1602

Build Status

Introduction

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).

Dependencies

Requires esp32-smbus.

Example

An example of this component in use can be found at DavidAntliff/esp32-i2c-lcd1602-example.

Features

  • 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.

Documentation

Automatically generated API documentation (doxygen) is available here.

Source Code

The source is available from GitHub.

License

The code in this project is licensed under the MIT license - see LICENSE for details.

Links

Acknowledgements

  • Inspired by the Arduino DFRobot sample code.
  • "SMBus" is a trademark of Intel Corporation.
  • "I2C" is a registered trademark of Phillips Corporation.

Roadmap

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.

About

ESP32-compatible C library for LCD1602 display via I2C backpack.

License:MIT License


Languages

Language:C 99.6%Language:CMake 0.3%Language:Makefile 0.0%