Introduction: Connecting 16x2 LCD to Raspberry Pi

Picture of Connecting 16x2 LCD to Raspberry Pi

When you’re done playing with LEDs, motors,switches etc  the next thing to do is connecting a 16×2 alphanumeric LCD module. The LCD modules are affordable (less than $10) and effortless to interface to the Raspberry Pi. They have 16 data pins but we would be using only 6 pins.

Almost all 16×2 LCD available in the market are based on Hitachi HD44780 LCD controller. This permits you to purchase  nearly any unit and make sure its determined to work in  same way as all others.There are loads to browse on eBay.

Step 1: Circuit

Picture of Circuit

The circuit consists of a 8 bit I2C port expander IC named PCF8574. HD44780 is interfaced with Raspberrypi via PCF8574.
For the main circuit & schematic please visit my blog for more info-

Step 2: Code

Picture of Code

Going to the programming part, Python is utilized to control the logic part.I have composed a straightforward library to communicate with the LCD utilizing the I2C bus.Please visit my Raspberry Pi Blog for code and other projects:-


kirtiksoni (author)2015-01-18

Can i use the library without using the IC? Please do reply

rahulkar (author)2012-11-15

The library used here is a simple python script, which contains all the necessary hardware settings to communicate with the LCD via I2C bus.

amandaghassaei (author)2012-11-08

can you talk a little bit more about your library here?

About This Instructable




More by rahulkar:LOGO Emulator using AVRLED Blinking With Raspberry PiConnecting 16x2 LCD to Raspberry Pi
Add instructable to: