Let's Make Robots!

Controlling 2 lcds

How would i control 2 16x2 lcds using a arduino mega? I know how to control 1 but i do not understand how to control 2 of them. Edit: i want to control them separately and i would hope i could just use the normal, non serial ones. That is i want to be able to use the liquid crystal library but that from what i can tell only controls one because when you lcd.print you are not saying to which one to print. I understand arduino mega has multiple serial lines so i guess maybe that would make it possible to use multiple serial lcds but i am not sure. Plus i do not know exactly how serial lcds work, does not looks as simple as serial.print, or is it? so i have 2 questions here. How to control 2 lcds ? and how a serial lcd works if that would be a solution?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

This should also work with an Arduino. Just create 2 lcd instances with different enable pins. The other pins can be connected parallel to both LCDs.  Of cause on a Arduino Mega you can use a complete different set on pins. But I must say, I have never tried this before.

Example for 2 LCDs 4-Bit Mode, all pins parallel except enable pin (pin 10 LCD1, pin 11 LCD2), no R/W (connect to GND):

#include <LiquidCrystal.h>

LiquidCrystal lcd1(12, 10, 5, 4, 3, 2);
LiquidCrystal lcd2(12, 11, 5, 4, 3, 2);

void setup()
lcd1.print("hello, world 1!");
lcd2.print("hello, world 2!");


void loop() {}


Both of the LCDs arrived yesterday and i was able to try them out. Thanks, this way works. Great to know i can save pins.
well that makes sense. I will try this when ever i get 2 new lcds now that i see it can be done .

serial is that simple....just set it and go.

for a picaxe it would just be

serialout lcdA, data

serialout lcdB, data

where lcdX is the pin you'd send the serial data on.

the parallel ones I'd imagine are the same sort of idea. You just need to have enough pins to do it.