Shop OBEX P1 Docs P2 Docs Learn Events
Monitoring an HD44780 Display — Parallax Forums

Monitoring an HD44780 Display

Jim FouchJim Fouch Posts: 395
edited 2014-12-14 22:49 in Propeller 1
I wanted to throw out an idea I have for tracking/monitoring a device that uses an HD44780 LCD display. I'm looking to monitor a machine that uses one of these to display status of the machine.

I do not have access to any kind of serial stream from the machine to see what's on the display. My thoughts are to have a Propeller COG monitor the pins that go to the LCD and basically do the same functions as the HD44780 and keep a local copy of what's on the display.

This should be pretty doable..... I think anyway.

I haven't dug too deep into the machine. Not sure if it's a 4-bit or 8-bit parallel interface. But I should be able to do it either way.

Should basically just be able to watch the clock pin and when I see a change read the other pins (Register Select, Command/Data, R/W) and run everything through a state machine and keep a local memory map of all characters sent to the display. I'll have to react to commands like Clear Screen and position commands.

I know this is the long way around the mountain so to speak. But, it's not the hardest thing I have ever tackled. Heck, on one project I did for a client I had to monitor graphical printer commands sent to a receipt printer and then do an OCR type of process on the output to get back to the ASCII data that was sent to the printer to electronically store that info. That process took me about 6 months to master. It would actually TEACH itself new character combinations. It was really hard because the fonts were proportional and some of the characters touched. There was no way to know what combinations of characters could ever be printed, so you could only teach it basic characters for. This was not on the Propeller and I was able to leverage the power of a full PC.

Comments

  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-12-14 21:21
    Jim Fouch wrote: »
    I wanted to throw out an idea I have for tracking/monitoring a device that uses an HD44780 LCD display. I'm looking to monitor a machine that uses one of these to display status of the machine.

    I do not have access to any kind of serial stream from the machine to see what's on the display. My thoughts are to have a Propeller COG monitor the pins that go to the LCD and basically do the same functions as the HD44780 and keep a local copy of what's on the display.

    This should be pretty doable..... I think anyway.

    I haven't dug too deep into the machine. Not sure if it's a 4-bit or 8-bit parallel interface. But I should be able to do it either way.

    Should basically just be able to watch the clock pin and when I see a change read the other pins (Register Select, Command/Data, R/W) and run everything through a state machine and keep a local memory map of all characters sent to the display. I'll have to react to commands like Clear Screen and position commands.

    I know this is the long way around the mountain so to speak. But, it's not the hardest thing I have ever tackled. Heck, on one project I did for a client I had to monitor graphical printer commands sent to a receipt printer and then do an OCR type of process on the output to get back to the ASCII data that was sent to the printer to electronically store that info. That process took me about 6 months to master. It would actually TEACH itself new character combinations. It was really hard because the fonts were proportional and some of the characters touched. There was no way to know what combinations of characters could ever be printed, so you could only teach it basic characters for. This was not on the Propeller and I was able to leverage the power of a full PC.

    Yep, totally doable.....I think anyway :)

    Write cycle time even on the old data bus was pretty slow at around 1us access but of course practically all displays these days are driven from I/O. Even at 1us there isn't a problem because it's simply a matter of reading the 4 or 8-bit data along with RS and only when R/W is low. So a WAITPEQ on the CS line can read in controls and characters and update a message buffer. You could even stack those messages too if need be. So one cog running PASM to gather and process the data or you could even have another cog worry about interpreting the data and instructions then formatting the message.
  • Jim FouchJim Fouch Posts: 395
    edited 2014-12-14 22:49
    Digging into the specs for the machine (3D Printer) they use a shift register to save pins, so I'm guessing it's even slower then a normal LCD. Looking on the opensource code for the printer, they are not doing anything crazy and I should only have to code for a hand full of commands and place the characters in an area of memory to mimic the LCD Display.

    I'm also using the same Propeller to track in real time all the three axes as wells as two extruders. I don't know any other processors that could do this so easily.

    I'm currently using a separate COG for each Axes and each extruder. I think I can get two axes to track in one COG, but three was a bit too much and I was missing Step/Direction pulses.

    This is mostly all written in PASM to keep up with how fast steps are sent to the Stepper controllers.
Sign In or Register to comment.