Shift Register Is All It Takes To Make A 3-wire Serial LCD

This hack is a bit older, but one aspect of the setup makes it worth sharing. Shift registers are a common component to include in a project when you need to increase the number of I/O pins available. We’ve used them to drive LCD screens before, but we never realize you could use a 595 chip to make a 3-wire serial LCD interface. That’s because we’ve always thought of shift registers as having three control pins which must be addressed: data, clock, and latch. But it seems that’s not the case. This hack gangs the pins for clock and latch (called the storage register clock input on this chip) together. This causes the shifted data to be latched to output register one clock cycle after it is shifted into the chip.

This means you can operate the 595 chip with just two pins, but alas, you do need one more connection to drive the LCD properly. This is an HD44780 compliant display. It is being used in 4-bit mode; four of the shift register pins provide that data, while a fifth controls the Register Select pin. Since the shifted data from the 595 appears on the pins after each clock strobe, you must control the Enable pin on the LCD separately or it will behave sporadically.

So there you have it, control an HD44780 display with just 3-pins by using a $0.42 part. Are we going a little too fast for you? Check out this 595 tutorial and give the shift register simulator a try. That should bring you up to speed.

[Thanks Rajendra]

Fast Serial LCD Interface

serial lcd

This is a serial interface for any LCD using the incredibly common 44780 controller. There are a couple different serial interfaces like this on the market, but this project aims to be a superior version. It can use 5 – 30V with an included regulator. It has ESD protection. True RS232 levels mean you can use really long cables. Up to 8 buttons are also supported. This would work great with a car computer. All of the software and schematics are provided. Have a look around the madhacker site for a lot of other cool projects.

[thanks Stuart]

Continue reading “Fast Serial LCD Interface”

Cheap LCD Uses USB Serial

Browsing the Asian marketplaces online is always an experience. Sometimes, you see things at ridiculously low prices. Other times, you see things and wonder who is buying them and why — a shrimp pillow? But sometimes, you see something that probably could have a more useful purpose than the proposed use case.

That’s the case with the glut of “smart displays” you can find at very low prices. Ostensibly, these are being sold as system monitors. A business-card-sized LCD hooks up via USB and shows your CPU speed, temperature, and so on. Of course, this requires sketchy Windows software. I don’t run Windows, and if I did, I wouldn’t be keen to put some strange service on just so I could see tiny displays of my system information. But a 3.5-inch IPS LCD screen for $15 or less probably has some other uses. But how to drive it? Turns out, it is easier than you think and the hardware looks reasonably hackable, too.

Like a lot of this cheap stuff, these screens are sold under a variety of names, and apparently, there are some subtle differences. Two of the main makers of these screens are Turing and XuanFang, although you rarely see those names in the online listings. As you might expect, though, someone has reverse-engineered the protocol, and there is Python software that will replace the stock Windows software the devices use. Even better, there is an example of using the library for your own purposes.

Continue reading “Cheap LCD Uses USB Serial”

Two-wire Serial Backpack For GLCD Screens

[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.

Continue reading “Two-wire Serial Backpack For GLCD Screens”

A Thoroughly Modern Serial Terminal

The humble desktop serial terminal may have long disappeared from the world of corporate IT, but there are still plenty of moments when professionals and enthusiasts alike need to hook up to a serial port. Many of us use a serial port on our laptops or other mobile devices, but [Neil Crawforth] has gone one better than that with the VT2040. It’s an old-style serial terminal in a super-handy portable format, and as one might guess from the name, it has an RP2040 microcontroller at its heart.

Attached to the chip is a rather nice keyboard, and an ILI9488 480×320 LCD display. The software is modular, providing a handy set of re-usable libraries for the different functions including a PIO-based serial port. His main application seems to be talking to an ESP8266, but we’re guessing with a MAX232 or other level shifter chip it could drive a more traditional port. Everything can be found in the project’s GitHub repository, allowing anyone to join the fun.

As long-time readers will know, we’ve been partial to a few serial terminals in the past. Particularly beloved is this extremely retro model with vintage dot matrix LEDs.

Getting Serial Data Out Of An Old Spectrophotometer

[Jure Spiler] came into possession of an old spectrophotometer, which measures the absorbance and transmittance of light in a sample. Getting data out of the device was difficult, particularly as the model in question was an educational version missing some functionality. However, perseverance got the old machine talking happily to a PC.

After an earlier experiment with sniffing the signals being sent to the LCD, [Jure] did some more research. It turned out that a special expensive cable could hook up to the device’s parallel port and deliver serial data, for the low price of € 356 Euros. Now knowing a serial output was present, [Jure] was able to find the data stream desired.

Hooking up a logic analyzer to the “parallel port” on the machine revealed that the device would actually send serial data out over certain pins on the port. The trick that made it harder was that it was in Inverted RS232 form. Thus, all it took was a simple TTL inverter hooked up to a USB-TTL adapter to get the device talking to a modern PC.

With that achieved, [Jure] was able to whip up a simple VB6 program to collect data from the spectrometer and put it in a CSV file for further analysis. There’s even a program to graph the data right off the bat, making the scientific instrument easier and quicker to use than ever!

Oftentimes, old scientific hardware like this isn’t especially difficult to hack. It’s usually just hard enough to make busy scientists stump up the cash for the fancy adapters and cable, while being no match for the dedicated hacker!

Photo of the spectrophotometer in question, with a screenshot of the decoding software on the right

Exporting Data From Old Gear Through LCD Sniffing

[Jure Spiler] was at a flea market and got himself a spectrophotometer — a device that measures absorbance and transmittance of light at different wavelengths. This particular model seems to be about 25 years old, and it’s controlled by a built-in keyboard and uses a graphical LCD to display collected data. That might have been acceptable when it was made, but it wasn’t enough for [Jure]. Since he wanted to plot the spectrophotometry data and be able to save it into a CSV file, hacking ensued.

He decided to tap into the the display communication lines. This 128×64 graphical display, PC-1206B, uses a 8-bit interface, so with a 16-channel logic analyzer, he could see the data being sent to the display. He even wrote decoder software – taking CSV files from the logic analyzer and using primitive optical recognition on the decoded pixels to determine the digits being shown, and drawing a nice wavelength to absorbance graph. From there, he set out to make a standalone device sniffing the data bus and creating a stream of data he could send to a computer for storage and processing.

[Jure] stumbled into a roadblock, however, when he tried to use an Arduino for this task. Even using a sped-up GPIO library (as opposed to notoriously inefficient digitalRead), he couldn’t get a readout frequency higher than 80 KHz – with the required IO readout rate deemed as 1 MHz, something else would be called for. We do wonder if something like RP2040 with its PIO machinery would be better for making such captures.

At that point, however, he found out that there’s undocumented serial output on one of the pins of the spectrophotometer’s expansion port, and is currently investigating that, having shelved the LCD sniffing direction. Nevertheless, this serves as yet another example for us, for those times when an LCD connection is all that we can make use of.

We’ve seen hackers sniff LCD interfaces to get data from reflow ovens, take screenshots from Game Boys and even equip them with HDMI and VGA ports afterwards. With a skill like this, you can even give a new life to a vintage calculator with a decayed display! Got an LCD-equipped device but unsure about which specific controller it uses? We’ve talked about that!

Continue reading “Exporting Data From Old Gear Through LCD Sniffing”