4 LCD displays on 1 Arduino

I’m planning an Arduino based project where I would like to use two of the 16×2 character based LCD displays, but at the same time, don’t want to use all the I/O pins, I need some for data input also.

Therefor, I decided to do a test, and see if it’s possible for multiple displays to share some of the pins. The displays have an enable pin, so in theory it should be possible, and after a few tests, I can confirm that it works very well. I’m using the LiquidCrystal library that comes with Arduino 0018. That library is object oriented, and you set each pin for the display in the constructor, making it very easy to set separate pins for the enable pin for each display, and use a bus for the 4 data lines and RS. I’m not reading from the displays, to I simply tied R/W to GND, indicating write only.

This setup uses a total of 5 shared pins on the Arduino (Data and RS), and then one pin (Enable) for each display.

Below is my modified version of the HelloWorld example from the LiquidCrystal library, that initializes 4 displays and outputs individual content to each display.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// include the library code:
#include <LiquidCrystal.h>
 
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd1(12, 5, 7, 8, 9, 10);
LiquidCrystal lcd2(12, 4, 7, 8, 9, 10);
LiquidCrystal lcd3(12, 3, 7, 8, 9, 10);
LiquidCrystal lcd4(12, 2, 7, 8, 9, 10);
 
void setup() {
  // set up the LCD's number of rows and columns: 
  lcd1.begin(16, 2);
  lcd2.begin(16, 2);
  lcd3.begin(16, 2);
  lcd4.begin(16, 2);
 
  // Print a message to the LCD.
  lcd1.print("Disp1");
  lcd2.print("Disp2");
  lcd3.print("Disp3");
  lcd4.print("Disp4");
}
 
void loop() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  lcd1.setCursor(0, 1);
  lcd2.setCursor(0, 1);
  lcd3.setCursor(0, 1);
  lcd4.setCursor(0, 1);
 
 // print the number of seconds since reset:
  lcd1.print(millis()/1);
  lcd2.print(millis()/10);
  lcd3.print(millis()/100);
  lcd4.print(millis()/1000);
}

My test setup is all powered via USB, and the contrast is controlled using a single trim pot, feeding all the displays with the same voltage for the contrast pin (V0).

I’m using pin 7, 8, 9 and 10 on the Arduino for the data lines, pin 12 for RS and pin 2, 3, 4 and 5 for the enable signal for display 1, 2, 3 and 4 respectively, but that’s easy to change if you use some of them for other tasks.

Downloads

I have made a PDF file with the connection diagram for the breadboard setup. I have tried to draw the wires so that they can be traced, but if something is unclear, feel free to ask and I’ll do my best to clarify.

Related posts:

  1. Custom LCD Characters with Arduino A few days ago I saw a post on Adafruits...
  2. Programming the LCD I/O Backpack with an Arduino Since the workshop in the beginning of October, there has...
  3. Learning to program FPGA’s About two months ago a couple of guys from Labitat...

About Thomas Flummer

I'm an electronics engineer, primarily working with web related software development in my professional life, but in my free time, likes to tinker with various electronics projects, mostly focusing on the bridge between computer and the physical world.