Multiple LCDs - one shiftreg or two? (HD44780)

I’m at a point on a project where I’m looking to add a second LCD (primarily to show debug data).

I’ve been doing some searching, and I did see a thread a few weeks ago but am unable to find it again regarding hooking up multiple HD44780 LCDs with 74HC164 shift registers. But I have been doing some hunting on Google and on the forums, and seen several times that when using the 3-wire method (this one) with a 74HC164 that they can all share the same Data & Clock lines, and you just need to provide each LCD with a unique output for the Enable line.

As the Enable line goes directly to the LCD and not through the 74HC164, and the Data & Clock lines are going to each 74HC164 and are all tied together, presumably each 74HC164 is sending out the same data, but only the LCD with the Enable line set is actually doing anything with that data. Which got me thinking, which would be the best way to wire this up?

Like it is on the left? or on the right? or does it not make a difference?

Based on how I’ve interpreted the info Google’s turned up, with no actual real schematics, photos or other examples, I’m going to assume the method on the right is the “correct” way to do it? If so, what are the problems that make the method on the left unworkable? Or should both methods work just fine?


I haven't tried it myself, but both method should work. Depending on layout and where those LCD's are located, there might not be any need to use two shiftregisters.

Also, to show debug data, you can just use the serial connection to the computer (serial monitor).

Thanks Raron. :)

With regard to the debug data, serial connection won't be an option as I'll be testing it out in the field (literally), and packing as light as possible, so even a laptop wouldn't be doable.

I can't see any reason why you need the second shift register. It doesn't matter how you put the information on the data and RS lines as long as the enable lines are controlled separately. You have three unused outputs on the shift register, you probably could use two of them for the Enable lines although the programming would get a bit more complicated.

Have you seen this thread from the old forum?


Floresta, I love you. That was the thread I mentioned in my first post that I'd seen ages ago but couldn't seem to find again - I guess I was mistaken on the use of 164s :)

Thank you :)

With regard to the debug data, serial connection won't be an option

Have you considered a serial rs232 display for debugging, uses only one pin (and GND + 5V) - together with NewSoftSerial works quite well (for me).

e.g. -

OK there not as cheap, but when developing you can just use your laptop, and in the field you use the LCD.

That's interesting, hadn't seen that.

I'd been trying to find some kind of portable serial display device but came up empty. Thanks :)

There are many more, I have a 20x4 serial from parallax - -

and this one is on my wishlist - - as it also can scan a 4x3 matrix keyboard and send it over serial.

Thanks again Rob - handy to know about.

After thinking about things for a while, I think I'm still going to go the route of having two 20x4 LCDs built into the unit. Once I'm done with development, the second LCD will still be useful for feeding back data during in regular use.

Updating this for the sake of a bit more completeness for those running across the thread in the future. I posted this in response to another thread, but putting it here too. Will post again when my other LCDs turn up. :slight_smile:

This was the board I ultimately came up with for mine. Still waiting for the second LCD to arrive in the mail to give it a full testing though. But, it works with one LCD hooked up to either sockets, and it’s recognising which socket the LCD’s hooked up to and sending the appropriate output.

The 4N25’s are just to hook up to a camera for AF+Ground and Shutter+Ground connections. The light coloured lines are just wires to bridge gaps (working on single sided board).

Using Raron’s library -

No modifications needed, hopefully. We’ll see when my other LCDs show up, but for now this is how they’re declared…

#include <ShiftRegLCD.h>
ShiftRegLCD lcd(3, 2, 4, 2, 0);
ShiftRegLCD lcd2(3, 2, 5, 2, 0);

Then lcd.print sends to one output, and lcd2.print sends to the other. Like I said, it’s sneding the output to the right set of pins when I switch the LCD over from one to the other, but still need to test running two at the same time.

My other 4x20 LCDs showed up in the mail this morning. Running both with no problems :)

Just to clarify something.

There's 12 pins out on the shield for each LCD because they're running in 4-Bit mode.

Pins 1-6 (pin 1 being next to the +3.3v Arduino pin) go to pins 1-6 on the LCD. Pins 7-12 go to pins 11-16 on the LCD.

And proof...

Now just to mount the green one, switch the blue one out for another green one, and add a couple of backlight on/off switches. :)