LCD display with 74164

Interfacing Arduino 74164 Serial Shift Register Driving LCD Display

by Lewis Loflin

Here we will explore how to connect Arduino to a 2 line by 16 character LCD display. The electrical connections are shown above. I have avoided user supplied libraries because changes in the Arduino compiler means some of them don't work. The other point being how to write one's own code and get a better understanding of the electronics and how a micro-controller really operate. This will enable the student or hobbyist to connect other similar devices or learn how to connect new devices.

The code will allow one to display characters, strings, integers, and floats on the LCD display. Some of the code was borrowed from the following projects minus the GPIO expander and the use of a 74164 code for Arduino.

Download the complete code for this demo: arduino4a.txt.

YouTube video for this project: Using a SN74164 Serial Shift Register with a LCD Display and Arduino

About the 74164 Shift register and the LCD Display

Demo to shift byte into 74HC164 to operate LCD display. In the case of the Hd44780 type display Q1-Q7 of the 74164 connects to D0-D7 LCD.

The 74HC164 has three inputs:

As far as LSB first or MSB bit first is up to software and electrical connections on the output. LCD pin 6 (E), HIGH to LOW transition will clock info into display. Select command or data with RS. RS set to 0 is command, 1 is data. R/W goes to ground. LCD command codes are shown below.

Program code for this project: arduino_74164.txt