Go Down

Topic: can 2 lcds share one 3 wire 595? (Read 762 times) previous topic - next topic

Boffin1

Mar 28, 2013, 05:25 am Last Edit: Mar 28, 2013, 11:37 am by Boffin1 Reason: 1
I have been searching and there seem to be a lot of  2 and 3 wire libraries ( and posts )  plus some posts on sharing multiple lcds using the normal 6 wires.

If I were to use a 3 wire library ( whichever is best nowdays ),    can I disconnect the E pins from the lcds and parallel up all the other data pins from the single 595.

I would need 2 extra pins for the 2 Enables, which I could drive from my sketch independantly from the library.

The LiquidCrystal3W would think it is writing to one display, but I would latch the data to the appropriate LCD latch after sending to the 595 ?   Or is this not how it works?

Or perhaps I could use the 2 wire version, and then have N displays using 2+N pins.

If I was experienced enough to mess with libraries,  perhaps it would be possible to use the 4 data pin mode of the LCDs, and have 2 of the 595 outputs to latch either LCD enable pin ,    but I am not !

I dont think that would work as the latch would be too late....
With my mobile phone I can call people and talk to them -  how smart can you get ?

bperrybap

If you use a library like fm's liquidcrystal replacement library,
( https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home)
then you won't need any additional Arduino pins to run 2 LCDS if you are not using
backlight control.
When using the SR3W interface there is one free output pin on the SR.
(assuming no backlight control is used).
You can then use that free output pin on the SR for the E signal on the 2nd LCD.

To do that you simply wire up all the pins for both LCDs the same except
for the E signals.
Then wire each E signal up to separate output pins on the SR.
In your sketch you will declare the two constructors with the pins for each LCD.
Each LCD will use use the constructor that specifies the 3 arduino pins
and the 7 bits (pins) from the SR but does NOT enable backlight control.

That will allow the library to know about and be able to talk to two different LCDs
but share the same SR to talk to both of them.
No extra components, no extra Arduino pins.
The only draw back is you lose the ability for s/w backlight control.

--- bill

Boffin1

Thanks Bill, thats good news.

I will be leaving the backlight on for this project, so thats no issue,  I will try and write a simple sketch to try/post.
With my mobile phone I can call people and talk to them -  how smart can you get ?

Go Up