Connect HD44780 LCD character display to Windows 10 IoT devices via I2C and PCF8574
Author: Jaroslav Zivny
Version: 1.1
Keywords: Windows IoT, LCD, HD44780, PCF8574, I2C bus, Raspberry Pi 2
Git: https://github.com/DzeryCZ/Character-LCD-over-I2C
I2C bus is initialized by library constructor. You have to define there also PCF8574 pins.
displayI2C lcd = new displayI2C(DEVICE_I2C_ADDRESS, I2C_CONTROLLER_NAME, RS, RW, EN, D4, D5, D6, D7, BL);
Default DEVICE_I2C_ADDRESS
is 0x27
(you can change it by A0-2 pins on PCF8574 - for more info please read datasheet)
I2C_CONTROLLER_NAME
for Raspberry Pi 2 is "I2C1"
(For Arduino it should be "I2C5"
, but I did't test it.)
Other arguments are: RS = 0, RW = 1, EN = 2, D4 = 4, D5 = 5, D6 = 6, D7 = 7, BL = 3 (by default)
But the number of pins depends on your PCF8574.
Initialization of HD44780 display do by init method. More info
lcd.init();
Print string just by prints method e.g.
lcd.prints("Good morning");
Initialize HD44780 display
Arguments:
- bool turnOnDisplay (default: true)
- bool turnOnCursor (default: false)
- bool blinkCursor (default: false)
- bool cursorDirection (default: true)
- bool textShift (default: false)
Turn the Back light ON
No arguments
Turn the Back light OFF
No arguments
Print string to display
Arguments:
- string text
Print char to display
Arguments:
- char letter
Move cursor to start of the second line
No arguments
Move cursor to X and Y coordinates
Arguments:
- byte x
- byte y
Clear screen and move cursor to start
No arguments
Create custom symbol
Arguments:
- byte[] data
- byte address
Print custom symbol
Arguments:
- byte address
- faster rendering of characters
- vanilla version
If you find mistakes, things that could be done better, feel free to contribute!
Copyright (©) 2015 Jaroslav Živný.
Distributed under the MIT License.