Run 1 LCD on 2 Arduinos?

I am doing a project, where I have only 1 LCD (20x4),, but I'd like to send data to it using 2 separate Arduinos. In other words, my 2 Arduinos will be processing different stuff separately, while powered at the same time, but send data to Arduino separately and not at the same time.

Is this possible at all?

Any help is appreciated.



you should start reading about I2C. You'll have to connect 1 arduino to the lcd and use a buffer to show your data. Then connect your second one to the first one using I2C. The second one will send it's data to be shown to the first one, to show the data on the display.

This way you'll never have a conflict, beause only the first arduino will decide what to show. This way you can connect like 255 arduino's and use only 1 of them to show the data.

You would probably have better resource utilization if you connected the display to one Arduino and then forwarded messages from the second Arduino through the first.

That didn't answer your question. The answer is yes. However, there is a lot to do. You must make sure that only one Arduino talks at a time. so you will need some handshaking. For example: Let's say you have Arduinos "A" and "B". Let's use pins 4 and 5. You define 4 as output and 5 as input. You connect pin 4 of "A" to pin 5 of "B" and pin 4 of "B" to pin 5 of "A". Now, if "A" want to use the display, it first reads pin 5 to see if it is in use. If it is, it can wait for pin 5 to go low. If it is not in use then write a high to pin 4 saying "I want to use the display", Again read pin 5. If it is still low, then begin using the display display (lcd.begin(16, 2);). When you are finished, All pins used to communicate with the display should be switched to INPUT. You can then send a low to pin 4 saying you are done.

A normal interface is 6 pins. If you add in another 2 pins for handshaking you are at 8 pins each. Some form of serial communications between the two Arduinos would probably be a better solution. In addition, the serial link could be used to exchange other data.