Skip to content

Library to support the HD44780 LCD , (I2C PCF8574 "backpack" interface) for the RPI PICO RP2040 C++ SDK

License

Notifications You must be signed in to change notification settings

gavinlyonsrepo/HD44780_LCD_PCF8574_PICO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Website Rss Donate

 lcd

HD44780_LCD_PCF8574_PICO

Table of contents

Overview

  • Name : HD44780_LCD_PCF8574_PICO

  • Description :

  1. Library to support the HD44780 LCD , (I2C PCF8574 "backpack" interface)
  2. C++ library for the rp2040 PICO
  3. Backlight, scroll, cursor and entry-mode control.
  4. Custom character support + print class for numerical data.
  5. Hardware I2C using SDK functions.
  6. Tested on size 16x02 + 20x04
  7. Can support both I2C ports. IC20 or IC21 selected by user.
  • Toolchain

    1. Raspberry pi PICO RP2040
    2. SDK C++ compiler G++ for arm-none-eabi
    3. CMAKE , VScode
  • Port of my Arduino library at link.

  • Author: Gavin Lyons

Example files

The example files are in example folder. To build the one you want, edit the Cmaketxt file add_executable(${PROJECT_NAME} section, comment in one example file path and one only. The default is the HelloWorld one.

  1. examples/HelloWorld/main.cpp Basic usage.
  2. examples/TestRun/main.cpp Test sequence for 16x02 LCD.
  3. examples/TestRun20X04/main.cpp Test sequence for 20x04 LCD.

Software

There are four core files to library , The "print" base class provides a way to print numerical and other data types to screen.

  1. HD44780_LCD_PCF8574.hpp
  2. HD44780_LCD_PCF8574.cpp
  3. HD44780_LCD_PCF8574_Print.hpp
  4. HD44780_LCD_PCF8574_Print.cpp

The user can enable basic "printf" I2C debug messages by setting the debug flag variable. The I2C timeout is set to 50,000 uS and can also be adjusted if necessary . Both I2C ports can be used, IC20 or IC21 selected by user.

API

The API (application programming interface) html documentation is at link. Hosted on github pages and generated by Doxygen software. Here the user will find lots of information on files, functions & data types. This API is for the Arduino source port. It is very similar expect constructor, init and de-init I2C method's will be different.

Software API Url Link

Output

Output of custom character test in testrun example file on 16x02 display.

 pic

20x04 display.

 pic2

Notes

For detailed graphical description of entry modes , cursor types, custom characters and more see here link

16X04 board not tested but should work.