
Interfacing Arduino 74164 Serial Shift Register Driving LCD Display
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:
- Input A-B (pins 1, 2) is for data. they can be tied together or the one not used tied to +Vcc
- Clock pin 8 data is serially shifted in and out of the 8-bit register during the positive going transition of clock pulse.
- Clear (pin 9) is independent of the clock and accomplished by a low level at the clear input. Can connect to Vcc.
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
- Arduino IF Statement Code Examples
- Arduino Solid State Relay Motor Enable Control
- Arduino XOR Blinks LED
- Using Zero-Crossing Detectors with Arduino
- Hardware Interrupts Demo and Tutorial for Arduino
- In Depth Look at AC Power Control with Arduino
- Micro-controller AC Power Control Using Interrupts
- Light Activated SCR Based Optocouplers Circuit Examples
- Solid State AC Relays with Triacs
- YouTube
- Zero-Crossing Detectors Circuits and Applications
- Zero-Crossing Circuits for AC Power Control
- In Depth Look at AC Power Control with Arduino
- Micro-controller AC Power Control Using Interrupts
- YouTube Video for Arduino AC Power Control
- Arduino
- Arduino PWM to Analog Conversion
- Arduino Analog Digital Conversion Voltmeter
- Better Arduino Rotary Encoder Sensor
- Simple 3-Wire MAX6675 Thermocouple ADC Arduino Interface
- YouTube:
- 3-Wire MAX6675 Thermocouple ADC Arduino Interface
- Arduino
- Arduino PWM to Analog Conversion
- Arduino Analog Digital Conversion Voltmeter
- Better Arduino Rotary Encoder Sensor
- Simple 3-Wire MAX6675 Thermocouple ADC Arduino Interface
- YouTube:
- 3-Wire MAX6675 Thermocouple ADC Arduino Interface
- Arduino ADC Voltmeter YouTube video
- Arduino PWM to ADC YouTube video
- Connect Arduino to LCD Display with 74164 Shift Register
- Arduino with LCD Display and DS18B20 Temperature Sensor
- Below has differing code from the above. Works the same.
- Arduino with LCD Display and DHT11 Temperature-Humidity Sensor
- In Depth Look at AC Power Control with Arduino
- YouTube Video for Arduino AC Power Control
- Four part series:
- Experimenting with the PCA9555 32-Bit GPIO Expander with Arduino
- PCA9555 32-Bit GPIO Expander with Arduino and a 4X4 Keypad
- PCA9555 32-Bit GPIO Expander with Arduino Using Interrupts
- PCA9555 32-Bit GPIO Expander with Arduino and LCD Display
- YouTube Video for Series
- Arduino Projects Revisited Revised
- Programming ADS1115 4-Channel I2C ADC with Arduino
- Arduino uses ADS1115 with TMP37 to Measure Temperature
- Connect Arduino to I2C Liquid Crystal Display
- Arduino Reads Temperature Sensor Displays Temperature on LCD Display
- Arduino with MCP4725 12-bit Digital-to-Analog Converter Demo
- Videos
- Arduino with ADS1115 4-Channel 16-bit Analog-to-Digital Converter
- Arduino with MCP4725 12-Bit DAC