LCD 16x2 (parallel reading ?)

Hi
i have some control units that they are using the common LCD 16x2 display screen with the 16 pins all soldered to the main pcb board

the local factory that made the control units has closed so cant get any info from them

the control unit displays at the display screen some letters that correspond to the function of the control unit

lets say displays "S" when stop switch is not active and "s" when Stop switch is on (active)

i would like to make a small pcb with an arduino and gsm shield so i can monitor from distance via sms the status of the control unit.. if it has stopped and what was the reason based on the display readings (characters)

is that possible ? to read characters via (RS,RW,EN,D0,D1,D2,D3,D4,D5,D6,D7) pins with arduino ?

This forum thread may be of interest.

What you are wanting to do has come up a few times over the years.
It is deceptively difficult.
If you look at the thread referenced by groundFungus, there is lots of ignorance as to how the hd44780 interface works.
This includes all the way at the end in post #55 that talks about a pulse on E or looking at rising edge of E.
That isn't how E works.
Data sent to the LCD is latched on the falling of E and both the data and control signals are only guaranteed to be valid at that point in time and 10 nanoseconds beyond that point in time.

In order to do what you want, you have to look at all the LCD signals and interpret them in real time just like the LCD does.
This means you have to interpret the signals to process all commands and data writes just like the LCD does to create a shadow of the LCD display memory.
Then you can read that shadow memory to see what was written to the display.

This is what makes doing what you want to do complicated.

The hd44780 interface and its timing requirements is very well defined but how the host uses it prior to E falling can vary substantially.
i.e. how the host sets up the signals prior to dropping the E signal and the timing of how those signals and data lines are setup can vary substantially between hosts that control the LCD.
Look at figure 26 of the hitachi hd44780 datasheet.
The variation is ok and allowed.
These are the critical things (timing assumes 4.5v to 5v operation)

  • the LCD control signals be setup and stable before raising E for tAS (40ns)
  • the LCD data signals are setup and stable before dropping E for tDSW (80ns)
  • the LCD data and control signals must remain stable after dropping E for tH (10ns)
  • minimum time E can be high PWEH (230ns)
  • minimum cycle E from E high to E high again tcycE (500ns)

Note that these times are minimums not maximums.

The actual timing can vary substantially from host implementations.
One big issue when trying to sniff and process these signals in realtime is that the minimum times are way shorter than an arduino could monitor. So depending on the host implementation,
the signals may not be stable long enough or change so quickly that an arduino may not be able to process them fast enough.

It all depends on the host and how it controls the LCD signals.
Before venturing down this path, I'd recommend hooking up a logic analyzer and having a look at the signals.
This will provide lots of information. You will then know how the signals are set up and the timing and will be able to determine if an arduino could monitor the signals.

Once you can monitor the signals, you can then implement the software to interpret the commands and data write operations necessary to be able to create a shadow memory of the LCD display.

--- bill

Basically, you need to attach a latch - a 74HC165 - to the lines (and if it is indeed using 8-bit mode, then you need a second latch in order to monitor the command/ data control bit) in order to respond in the same way as the HD44780 and then manage to read the data in time for the next instruction to the display.

More practical to hack the code of your control unit in order either to see if it already has any other status output, or to add one.

There is another possibility.
The Arduino could take over the hd44780 interface to the LCD,
and read the DDRAM contents of the display to see what is on the display.

The issue with this is that the Arduino would need to know what mode the display is in (4bit vs 8 bit).
That isn't difficult to determine.
Also, the other host can't be doing anything to the display while this is going on.
If the other host is doing something, then the display will likely get corrupted and if in 4 bit mode, nibble synchronization could be lost.
Once nibble sync is lost, the host must re-initialize the LCD.

From a h/w perspective it would require providing a way to isolate the data & control signals of the host from the LCD so that the Arduino could control them.

--- bill