Two-wire serial backpack for GLCD screens

2-wire-serial-backpack-for-glcd

[Debraj] wrote in about his 2-wire serial backpack he developed for a Graphic LCD screen. It’s build on a hunk of protoboard and uses a pair of 595 shift registers to translate incoming serial data to the parallel interface which is used by the LCD screen. It takes more time to push commands this way, but the interface is still quite snappy as you can see in the clip after the jump.

The real trick here is how the hardware has been configured to get away without a third wire for latching the shift registers (if you need a primer on 595 chips check out this feature). The idea of using a latch is that all of the data can be shifted in over the serial pin before it appears on the output pins. Otherwise, the GLCD would see each bit as it shifts into the register, wreaking havoc on its communication protocol. [Debraj] gets around this by using a diode AND gate trick he learned from this other serial LCD project.

One good thing about this method is the 595 chips have a wide range of control voltage that will allow you to drive this with 3.3V or 5V microcontrollers. But you do need to implement the communication protocol and push those commands via serial. For nearly the same cost in chips something like an ATtiny2313 could be substituted to make an even simpler addressing scheme — or even switch to 1-wire protocol. But you’d then lose the wide input voltage tolerance.

Comments

  1. James says:

    It’s not hard to control a (SIPO) latched shift register with just one line and some careful timing, a short drop of the line causes 1 to be entered, a medium drop of the line causes a 0 to be entered and a long drop of the line causes the data to latch (and a zero to be entered). Disadvantage is that you do lose 1 bit (the last bit is always zero).

    If you google for “Shift1 system for 1-wire shift registers” you’ll find the details about how to do it. For the arduino users, search for shiftreglcd123 for an implementation of controlling an LCD from a shift register with 1 wire control (or 2, or 3, depending on your choice).

  2. Galane says:

    How about multiplexing the power and data on two wires?

    • qwerty says:

      Doable for sure, but it would not spare an i/o pin on the controlling MCU.
      Technically it would be possible to use just two wires both for power supply and controlling signals, but again the increased complexity would only help to save two wires.

  3. fartface says:

    Or you can just burn a PIC and make it even smaller or even translate the nasty protocol to something more reasonable.

    • Debraj says:

      I accept that, even use 1 wire (+ 5V, GND) using the UART. But only addition is that we need to put separate code for the PIC and also source the PIC. With the 74HC795, there is no software to be written and the IC is available in local market..

  4. Jon says:

    I’m a non-electronics enthusiast here, but I see a couple more than two wires in that picture.

  5. ColonelPannick says:

    Am I the only one that’s been getting headaches from whatever motion compensation people are using on their videos of late?

  6. Fallen says:

    This is an excellent hack :D
    I had one heck of a time with the hd44780 LCDs out there…
    Took me a month just to get them working right with a PIC18F…
    I never ventured into the graphical LCD arena, since the text only hd44780 was such a nightmare.
    This backpack

  7. Kirsch says:

    The same Trick is described in Elektor EN 2008-05 “Two-wire LCD”

    Or Elektor DE 2008-05 “2-Draht-LCD”
    You can get the german Article here: http://www.cczwei.de/index.php?id=atm18_download

  8. Ralph says:

    Nothing really novel.
    Controlling a 74595 with one wire and a couple RC circuits is, rather ingenious:
    http://www.romanblack.com/shift1.htm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s