More than one LCD - possible?

Hi.

I was reading about HD44780 LCD pins (HD44780 datasheet is too big for now to read it all) and there's something I'd like to know, since I have only one LCD for now and cannot check it by myself.

Is it possible to drive more LCDs with the same data pins, changing only Enable state (with shift register for example)? Of course it could work only when changing enable to FALSE would freeze LCD, not turn it off...

Or is it stupid?

Yes you can do that. Make sure you are only writing to the display and never read from it. If you read from it you will have both displays trying to drive the pins and you will damage them.

Thanks.

One more, forgive me my ignorance, but how do you read from LCD? I always was wondering, if it is possible to make "printScreen" from lcd, or just read the character on [row, column], but in the reference I don't see any functions allowing me to read.

EDIT:
Sorry, Google doesn't hurt:
Reading the LCD RAM
How to use intelligent LCDs part I
How to use intelligent LCDs part II

But I still don't see it in LCD library...

I would expect the enable pin to control both input and output (which are tri-state) so it should be possible to read as well as write to multiple displays. I haven't tried it with text LCDs but it's certainly the case with graphical LCDs.

Usually it's a status bit that is read from the LCD to see if its ready (however the current version of the LiquidCrystal library does not support this)

The memory mapping of character data is a little complicated in a text LCD and its probably easier to maintain a copy of sent characters in your sketch rather than try to read the character memory in the LCD.

but how do you read from LCD?

There is a read not write line on the LCD interface, put it high to read.

But I still don't see it in LCD library...

The library doesn't read the LCD. If it did you could replace all those delays with polling the LCD to see when it is free. This substantially speeds up things like blanking the display and resting the cursor, but is not much of a saving for just a single character write. There are lots of alternative libraries around that do read.

WRonX:

To answer your original question about multiple LCDs take a look at this thread: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1265969050. Scroll down and look at the pictures. This implementation is much easier than your shift register proposal, it's almost trivial.

I always was wondering, if it is possible to make "printScreen" from lcd,

This is not supported by any library that I have seen nor by the LCD controller instruction set. You could write a program to do this, but Mem's solution (maintain a copy of sent characters in your sketch) is much easier.

or just read the character on [row, column]

All of the above applies here too.

As Mem also stated "Usually it's a status bit that is read from the LCD ...". You can also get the last address that was used (or maybe it's the next address that is going to be used) when you get the status bit.

You can also use any of the 80 bytes of CGRAM (the locations where the displayed characters are stored) as general purpose RAM. This seems absurd nowadays, but when this device was developed RAM was very expensive and every byte was valuable.

Don

This implementation is much easier than your shift register proposal, it's almost trivial.

I thought so, but as always, I was thinking about "n" LCDs, not 2 LCDs :slight_smile:

I think it's the matter of which solution will save more pins for other purposes. The shift register, AFAIR uses three pins, so in case of small number (1 to 3) of LCDs it's of course more "economic" to use one more pin for every LCD. Thanks.

You might also consider I2C interface for the LCD . . .
http://www.xs4all.nl/~hmario/arduino/LiquidCrystal_I2C/

It does require an additional chip, but all displays would only use 2 pins.

(Disclaimer: I use this for a single LCD and it works great, but have not tried multiple displays myself.)