Giter Club home page Giter Club logo

hd44780_lcd_pcf8574's Introduction

Website Rss Donate

 lcd image

Hd44780_LCD_PCF8574

Table of contents

Overview

  • Name : HD44780_LCD_PCF8574
  • Description :
  1. Library to support the HD44780 LCD , (I2C PCF8574 "backpack" interface) for the Arduino Eco system
  2. C++ library.
  3. Backlight, scroll, cursor and entry-mode control.
  4. Custom character support + print class for numerical data.
  5. Hardware I2C
  6. Tested on size 16x02 + 20x04 (but may work on other sizes eg 16X4 but not tested).
  7. Can support both I2C ports on the STM32 see tested section.
  • Author: Gavin Lyons

Installation

The library is included in the official Arduino library manger and the optimum way to install it is using the library manager in the Arduino IDE.

Software

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.

Software API Url Link

Output

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

 pic

20x04 display.

 pic2

Tested on

Tested on following MCUs. The example files are setup for an UNO/NANO rev 3.0 for the pin connections used by for other MCU testing see extras/doc folder GPIO_MCU_used.txt file.

  1. Arduino UNO & NANO v3
  2. ESP8266
  3. ESP32
  4. STM32 "blue pill", Can support both I2C ports , Use STM32 example file.
  5. Arduino UNO R4 minima

Notes

  1. "stm32duino" board manager core used in testing STM32 "blue pill"
  2. For description of entry modes , cursor types, custom characters etc See
  3. 16X04 board not tested as not available but should work!
  4. I2C Debugging can be turned on by commenting in a define in header file.

hd44780_lcd_pcf8574's People

Contributors

gavinlyonsrepo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

hd44780_lcd_pcf8574's Issues

Use more concise naming conventions by removing redundant words

Library works ok, tested on (clone) Uno and 16 x 2 display so great functionality wise. A little improvement though.

I find function naming conventions a bit too explicit though e.g

lcd.PCF8574_LCDResetScreen(HD44780LCD::LCDCursorTypeOff);

or

lcd.PCF8574_LCDSendString("Hello World!");

as I see lot of redundant PCF8574 and LCD words here. Could be simply

lcd.write("Hello World!");

or

lcd.reset(HD44780LCD::CursorOff);

as class HD44780LCD namespaces all within so there is no naming collisions with other writes or resets or anything else. Also calls such as

lcd.PCF8574_LCDGOTO(HD44780LCD::LCDLineNumberOne, 0);

could be written in more concise way

lcd.goto(0, 0); // goto first line, first column

as I don't see any value of enuming lines.

Anyway, thanks for the work, works perfect.

Bug in LCDGOTO Function

The function 'HD44780LCD::PCF8574_LCDGOTO' sets the cursor to the desired position by calculating bitwise OR of the line address and the column number. This works well with the starting values of line one (0x80) and line 2 (0xC0) as well as the 16col values for line 3 (0x90) and line 4 (0xD0).
But for 20 column LCD the starting values for line 3 (0x94) and line 4 (0xD4) do not work.
The base values are correct, but the bitwise OR lead to wrong position.
Please see red marked cells in image for reference.
LCDAddress_Bug
I suggest using a simple addition the calculate the LCD ADDRESS.

for STM32 bluepill Connect SDA and SCL to B7 and B6 respectively

for STM32 Connect SDA and SCL to B7 and B6 respectively (just saying as its not stated anywhere I could find). Worked a treat thanks even on CKS32!

Is it possible to add a way to set the I2C port to use on the Bluepill? It is done on the example I2C scanner so would be a nice addition.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.