Pages: [1]   Go Down
Author Topic: Multiple LCDs  (Read 552 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm using one of the LCD libraries (https://bitbucket.org/fmalpartida/new-liquidcrystal/overview) and have a working LCD display. I've extended this and now I have 2 LCDs running off a Uno. Now I've had to use another 3 pins for this, so I'm up to 6. I'm using the LiquidCrystal_SR method/option with 2 x 74HC595Ns.

Now there doesn't appear to be a way of daisy chaining LCD displays with this library and therefore keep the pin count low with the displays I have (http://www.ebay.co.uk/itm/390514358695?var=660105289659&ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649)

So is this library the best to use, have I just missed something and it can be done already, or is there a better/alternative library that allows for multiple displays using multiple 74HC595Ns.

Now I'm an Arduino and Electronics noob, been "playing" for only about 4 weeks now, so please be gentle.

Thanks, Mike...
Logged

Dallas, TX USA
Offline Offline
Faraday Member
**
Karma: 67
Posts: 2694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Mike,
fm's library is one of the most complete, flexible,  and one of the fastest libraries out there.
(I'm the author of the SR2W code)

fm's SR device interface class can use 2 wire or 3 wire mode.
I'm assuming that since you said:
Quote
Now I've had to use another 3 pins for this, so I'm up to 6
that you are running in 3 wire mode.

In 3 wire mode you can "cheat" and share the clock and data pins.
You must have a separate strobe/latch pin for each shift register.
It works  because while all the shift registers will be clocking in and shifting new data,
only the one that gets latched will actually modify the data that the LCD is seeing.
You can either run SR in 3 wire mode or use SR3W.
So when working in 3 wire mode,  you will
need 2+N pins and N shift registers to talk to N LCDs.
So 2 LCDs would use 4 pins and 3 LCDs would use 5 pins etc...

You also can do the same using 2 wire mode with either SR in two wire mode or using SR2W.
For that you share the clock pins on all the Shift registers but have a separate data pin for each.
So for 2 wire mode you need
1+N pins and N shift registers to talk to N LCDs.
So 2 LCDs would use 3 pins and 3 LCDs would use 4 pins etc...

If you are running SR in 3 wire mode, you should be able to quickly change things to work with
fewer pins.
Change the constructors to share the same srdata and srclock pins and then re-wire
your shift registers to match.
You will need to make sure your circuit doesn't use lengthy wires
and to make sure your 595s have proper decoupling to prevent any noise and crosstalk
between the ICs.

--- bill
Logged

Dallas, TX USA
Offline Offline
Faraday Member
**
Karma: 67
Posts: 2694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Mike,
One other thing. If you really want to limit the pins, i2c may be a better choice.
It will only use 2 pins.
You will have to modify the i2c address of the i2c expander on each i2c LCD backpack sharing
the i2c bus and it isn't as fast as using a 595 but it will keep the pin count to just the 2 i2c pins
on the AVR.

--- bill
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Answering the original question, without expander chips, one can share use of the RS and DATA lines with multiple instances of the LCDs.  One just needs individual ENABLE lines to address each display.
Ken.
Logged

Dallas, TX USA
Offline Offline
Faraday Member
**
Karma: 67
Posts: 2694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

As ken stated, running multiple LCDs without expander chips, (using 4 bit mode and directly wired to pins)
works fine.
It uses 5+N pins on the Arduino.
So 1 LCD uses 6 pins, 2 LCDs uses 7 pins, 3 LCDs uses 8 pins etc...

--- bill
Logged

Pages: [1]   Go Up
Jump to: