[Felipe Tavares] wasn’t satisfied with the boring default fonts on an HD44780-based display. And while you can play some clever tricks with user-defined characters, if you want to treat the display as an array of pixels, you’ve got to get out your scalpel and cut up a data line.
The hack builds on work from [MisterHW] who documented the bits going from the common display driver to the display, and suggested that by cutting the data line and sending your own bits, you could send arbitrary graphics. The trick was to make sure that they’re in sync with the display, though, which means reading the frame sync line in user code.
This done, it looks like [Felipe] has it working! If you can read Rust for the ESP32, he has even provided us with a working demo of the code that makes it work.
We can’t help but wonder if it’s not possible to go even lower-level and omit the HD44780 entirely. Has anyone tried driving one of these little LCD displays directly from a microcontroller, essentially implementing the HD44780 yourself?
Any way you slice it, this is a cool hack, and it opens up the doors to DOOM, or as [MisterHW] suggests, Bad Apple on these little displays . If you do it, we want to see it.
If your needs aren’t so exotic, the classic HD44780 display is a piece of cake to get working, and an invaluable tool in anyone’s toolbox.
wonderful writeup
This is quite clever!
Here’s an example of directly controlling an LCD using Atmega8 GPIO: https://www.elektroda.pl/rtvforum/topic3625294.html (in Polish)
While this is impressive, I like these display specifically because they’re not an array of pixels but text based, which I consider much simpler to drive. If I want fancy graphics, there’s so many better options for that. Still, interesting hack.
The HD44780 actually handles more than just converting ASCII characters into bitmaps and storing those in a refresh buffer: for one thing, it does the refreshing! But more importantly, and a bit more trickily, it also takes care of the multiple voltage levels and pulse widths that the liquid crystal cells need, along with periodically inverting the polarity so you don’t end up deplating the electrodes from the glass. Reinventing all of this would be like building a 555 out of microcontrollers. Not that people don’t do that, too.
“with periodically inverting the polarity so you don’t end up deplating the electrodes from the glass”
That’s pretty neat. I wonder what the lifespan would be without this trick.
LCD’s run on AC, not DC.
I never knew that. I found an app note: https://ww1.microchip.com/downloads/en/Appnotes/doc2569.pdf
Really clever! That is really a hack, and a great one!
Clever trick, but last time I looked, the 128×64 graphic displays were cheaper than HD44780s anyway. And unless you’re seriously resource-constrained, just as easy to use.
Yah sure. But this still looks like a HD44780. Anyone who sees it and knows what it is will be surprised by the graphics. No one is surprised by an actual graphics display.
I want to port X to it.
I bet there is a relatively simple way to build a frame buffer for it and run X in that.
A bit beyond my current knowledge though.