Connecting two LCDs to one arduino

Hi everybody,

I just received my two ADM1602K displays (2x16) which I would like to my arduino. The 6-wire Liquid Crystal example worked well with one.

Could anyone tell me whether and how it is possible to attach two of them to one arduino duemilanove?

Thank you,

Don

The Liquid Crystal library requires that you identify which 6 pins you have attached the LCD to, in some specific order. Just choose 6 other pins, and create another instance of the class, with those 6 pins.

LCD one(12, 11, 5, 4, 3, 2);
LCD two(9, 8, 6, 7, 14, 15); // Using some analog pins as digital

void setup()
{
   one.begin(16, 2);
   two.begin(16, 2);
   one.print("Hey, there");
   two.print("Is this thing working?");
}

void loop()
{
}

Ah ok, its that easy :slight_smile:

I can't test this atm since I didn't have the hardware.

Thanks!

If I remember one of those pins are Write Enable signal.
You could share all the other pins except WE ones, then bring high them one at a time so you can add multiple LCDs with just one pin more each.
Is it right?

If I remember one of those pins are Write Enable signal.
You could share all the other pins except WE ones, then bring high them one at a time so you can add multiple LCDs with just one pin more each.
Is it right?

Oh really? That would be very cool.

Is it still possible for them to have two different tests in that case?

One additional questions, can I also do this with flash (since I want to combine input of an phidget RFID reader, AS3 and the arduino with the screens)?

It would be the best if I could run the arduino application for sensor input, RGD LED output and the display output (since I have those codes) and send that data to flash and from flash to the arduino app as I have the RFID input in flash and a datavisualisation there.

Thank you!

I just checked the datsheet of my 1602 module, the line I was referring is called Enable, sometimes Strobe line, and it's marked with letter E.
If it's high the LCD module accepts input, otherwise it ignores it. That's why I think you can share all the other pins, however I never tried this.

Or you can use shift registers to connect LCDs. Google Code Archive - Long-term storage for Google Code Project Hosting. LCDl ib at link Google Code Archive - Long-term storage for Google Code Project Hosting. works wery well with 74HC595.

Nadir

Or you can use shift registers to connect LCDs. Google Code Archive - Long-term storage for Google Code Project Hosting. LCDl ib at link Google Code Archive - Long-term storage for Google Code Project Hosting. works wery well with 74HC595.

Nadir

In one of the examples, it says to use it like this:

USAGE: ShiftRegLCD LCDobjectvariablename(Datapin, Clockpin, Enablepin or TWO_WIRE [, Lines [, Font]]])
//   where Lines and Font are optional.
//     Enablepin: can be replaced by constant TWO_WIRE, if using only 2 wires.
//     Lines: 1 or 2 lines (or more if possible)
//     Font : 0 or 1, small or big font (8 or 10 pixel tall font, if available).

Is the enable pin the latch pin (on the 74HC595 for example)? :-?

[edit]If it's not, would one just have to unlatch/latch it oneself before sending data?[/edit]

So by setting E high for LCD1, you can write on that one. Then switching it of for LCD1 and setting it high for LCD2 makes it possible to write on LCD2.

I will try this tomorrow. If anyone has experience please let me know!

One other question, the sticker on my LCD displays read ADM1602K-NSW-FBS-Z6, but I can only find the datasheet ADM1602K-NSW-FBS-3.3v. I'm not sure whether my displays need the 3.3v described in that sheet or 5v. Does anyone know what it should be?
It is black and white (white backlight).

Thanks!

Hi TchnclFl,

I made the following wiring and used three wire connection of lib. But I was not able to make two wire connection with 74HC595 :(.

arduino pin Shiftregpin LCDpin


datapin -> 14 (ds)
clockpin-> 11 (shcp)
enablepin-> 12 (stcp) -> 6 (E) pin
3 (Q3) -> 4 (rs) pin
4 (Q4) -> 11 (D4) pin
5 (Q5) -> 12 (D5) pin
6 (Q6) -> 13 (D6) pin
7 (Q7) -> 14 (D7) pin