Skip to content

A C library (Linux + Arduino) to control 2 line x 16 character I2C LCD displays

License

Notifications You must be signed in to change notification settings

bitbank2/LCD1602

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LCD1602 - 2 line x 16 character LCD display

Written by Larry Bank
Copyright (c) 2017 BitBank Software, Inc.

LCD 1602

The common 1602 LCD found for sale is the marriage of a HD44780 LCD controller and an I2C I/O expander. These are connected such that the upper 4 data bits of the I2C data are connected to the upper 4 data bits of the LCD controller. The LCD controller supports a 4-bit data mode, so the other 4 data bits coming out of the I2C expander are used as control lines to select command/data, R/W, backlight control and the clock to trigger the data to be written/read. This puts more effort on the software since it must split each byte into two writes and manually pulse the clock line with multiple writes which toggle the correct data bit.

My purpose in releasing this library was to better understand the device by writing my own software for it in the hopes that it benefits the open source community.

Before building the demo app, make sure that the I2C bus number and address of your display are correct. For Raspberry Pi boards, the I2C bus is usually 1 and the display is usually located at addresses 0x20 to 0x27. Another thing to note is that you may not see anything on the display even though it works. There is a contrast control on the back which must be adjusted before the first use.

Building and running the library
--------------------------------
make
make -f make_demo
./demo

About

A C library (Linux + Arduino) to control 2 line x 16 character I2C LCD displays

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published