1 LCD display controlled by 2 microcontrollers - Page 1
Forum section: electronics / beginners

author: symbianas
author_rank: Regular Contributor
timestamp: April 13, 2020, 02:16:10 pm
content: Hi, I would like to control display which is controlled by microcontroller with another microcontroller. I would need to override all lines (D0,D1,D2,D3,D4,D5,D6,D7,RD,WR,RES,A0,CS1,CS2).I guess something like relays would work but I would need many relays and maybe there is batter solutions? Any ideas?All D0-D7 pins can be input/output.Is there a chip which could do that?The reason I want to do is to display additional info on car radio display.

author: Manul
author_rank: Super Contributor
timestamp: April 13, 2020, 02:27:30 pm
content: Hi there, nice to see someone from LTI suggest to use I2C LCD, or get an I2C converter board for your existing LCD. Then it will be simple. Or use tripple state output buffer IC's (complicated and plain overkill).

author: Back2Volts
author_rank: Unknown
timestamp: April 13, 2020, 02:28:54 pm
content: Yes, look for a serial solution.

author: DrG
author_rank: Super Contributor
timestamp: April 13, 2020, 02:35:31 pm
content: Your situation lacks some details, but maybe the easiest answer is to establish a serial connection between controllers only and leave the LCD connected to only one controller. Essentially, the controller not directly connected to the LCD, sends "commands" to the connected controller that are then sent to the LCD.

author: tooki
author_rank: Super Contributor
timestamp: April 13, 2020, 02:52:00 pm
content: I don’t understand why you’d want to do this, since it adds complexity. Why not just do as DrG says and have one microcontroller send the data to the other microcontroller, which then handles all the display signaling? This can easily be done with UART or I2C, among other ways.

author: madires
author_rank: Super Contributor
timestamp: April 13, 2020, 03:37:36 pm
content: With GPIO pins supporting HiZ, some simple glue logic for /RES and a signal between the MCUs to control which one is the current LCD master it should be possible. But it will waste a lot of GPIO pins. As already suggested it might be more reasonable to drive the LCD with just one MCU and let the other MCU send the display data to the first one via a serial bus.

author: symbianas
author_rank: Regular Contributor
timestamp: April 13, 2020, 04:01:35 pm
content: The main reason I want to do this is because I want to use same display which is already used in another circuit (car radio display). So I don't think I can switch to serial solution?Display is a car radio display. I want to connect Arduino to show additional information from CAN BUS on same display. I know how to display data on that display, but missing the "switch" part between the original controller of the car radio and my Arduino. So searching for solutions I could use.

author: madires
author_rank: Super Contributor
timestamp: April 13, 2020, 04:07:46 pm
content: In that case you don't have any control over the radio's MCU. So you'll need a dedicated display for the Arduino.

author: Manul
author_rank: Super Contributor
timestamp: April 13, 2020, 04:17:52 pm
content: The problem is how you will synchronize access? If arduino will take ownership of LCD for a moment, you may miss some LCD update event from car radio. Also there could be data corruption because of this unsynchronised access. The only solution seems to be "man in the middle". Arduino will be receiving car radio LCD data, relaying, buffering it if needed and also writing custom data. So LCD will be connected just to Arduino board in this case.

author: symbianas
author_rank: Regular Contributor
timestamp: April 13, 2020, 04:30:16 pm
content: I tried to do "man in the middle" approach, but signal seems to be too fast for Arduino.This is the signal capture form car radio:The parallel data which I need to capture in this case is available for 187nano seconds. So not sure if its possible to do with software, I think I need hardware solution.

author: Manul
author_rank: Super Contributor
timestamp: April 13, 2020, 04:46:08 pm
content: Does radio MCU also reads from LCD? Two way comm?

author: symbianas
author_rank: Regular Contributor
timestamp: April 13, 2020, 04:53:12 pm
content: Yes, that's the second problem I am facing, even if I could read data correctly I would also need to replay.

author: Manul
author_rank: Super Contributor
timestamp: April 13, 2020, 05:18:14 pm
content: Well, your project is a hard thing to do. Maybe it is possible to give radio MCU an external clock and stall it when needed (to at least solve sync problem). Thats a long shot. Probably will cause a crash or misbehaviour.

author: symbianas
author_rank: Regular Contributor
timestamp: April 13, 2020, 05:30:38 pm
content: I will try to disable RD pin and see if reading stops drawing on the display or if reading is not mandatory, but I guess it is...

author: symbianas
author_rank: Regular Contributor
timestamp: April 13, 2020, 05:45:43 pm
content: I put 3.3V to RD pin which should stop read command from radio MCU. It seems it still draws the data on the screen, but it tries to reset and draw again, so its blinking. I guess If I could capture the data when it draws it could be enough just to read data and not send it back to radio controller. So it turns out it would be enough to make one way communication.

author: Ground_Loop
author_rank: Frequent Contributor
timestamp: April 13, 2020, 07:35:17 pm
content: How about a couple of 74HC157 multiplexers controlled by one of the uCs to switch the data and control lines. Or maybe use SN74CBT3257C if it needs to be bidirectional.

author: ozcar
author_rank: Frequent Contributor
timestamp: April 13, 2020, 09:04:32 pm
content: In another thread here (https://www.eevblog.com/forum/projects/hd44780-reading-sniffing-data/) somebody wanted to sniff or spy on data sent to an HD44780 LCD. I think they managed to do that using an Arduino, but it looks like the timing for your LCD is a lot tighter (even for a HD44780 it could be just about impossible depending on the device driving it).Maybe something with a faster processor could do it in a tight loop doing nothing else, or maybe using DMA on a processor that has that, at least if you are correct about not needing to send data back to the radio.

author: tooki
author_rank: Super Contributor
timestamp: April 14, 2020, 05:36:01 pm
content: Quote from: symbianas on April 13, 2020, 04:01:35 pmIf you know how to drive it, presumably you've got a datasheet or something. If you could share with everyone what kind of display it is, its driver IC, etc, that'd probably help a lot.

author: gcewing
author_rank: Regular Contributor
timestamp: April 15, 2020, 02:07:07 pm
content: Are you sure it's absolutely necessary to share the radio display? It seems like giving the arduino its own display would be vastly simpler.