Pages: [1]   Go Down
Author Topic: Multiple LCDs - one shiftreg or two? (HD44780)  (Read 3747 times)
0 Members and 1 Guest are viewing this topic.
Lancaster, England
Offline Offline
Jr. Member
**
Karma: 0
Posts: 85
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

John

Norway
Offline Offline
Sr. Member
****
Karma: 4
Posts: 423
microscopic quantum convulsions of space-time
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi!

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).
Logged

Lancaster, England
Offline Offline
Jr. Member
**
Karma: 0
Posts: 85
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Raron. smiley

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.
Logged

John

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 39
Posts: 4387
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?  http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1265969050/0


Don
Logged

Lancaster, England
Offline Offline
Jr. Member
**
Karma: 0
Posts: 85
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley

Thank you smiley
« Last Edit: May 15, 2011, 07:39:36 pm by Kaouthia » Logged

John

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 221
Posts: 13848
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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. http://www.sparkfun.com/products/9395 -

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

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Lancaster, England
Offline Offline
Jr. Member
**
Karma: 0
Posts: 85
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley
Logged

John

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 221
Posts: 13848
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


There are many more, I have a 20x4 serial from parallax - http://www.parallax.com/Store/Accessories/Displays/tabid/159/CategoryID/34/List/0/SortField/0/Level/a/ProductID/51/Default.aspx -

and this one is on my wishlist - http://www.robotshop.com/ca/devantech-lcd03-blue.html - as it also can scan a 4x3 matrix keyboard and send it over serial.
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Lancaster, England
Offline Offline
Jr. Member
**
Karma: 0
Posts: 85
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

John

Lancaster, England
Offline Offline
Jr. Member
**
Karma: 0
Posts: 85
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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. smiley

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 - http://code.google.com/p/arduinoshiftreglcd/

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

Code:
#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.
Logged

John

Lancaster, England
Offline Offline
Jr. Member
**
Karma: 0
Posts: 85
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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.
Logged

John

Lancaster, England
Offline Offline
Jr. Member
**
Karma: 0
Posts: 85
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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. smiley
Logged

John

Pages: [1]   Go Up
Jump to: