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()
{
}
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?
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.
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.
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).