These days, there’s a huge variety of screens on the market for use with microcontrollers. OLEDs and graphic LCDs abound, while e-ink devices tempt the user with their clean look and low energy consumption. However, for many purposes, the humble HD44780 character LCD does the job just fine. If you’re using such a device, you might want to implement a simple menu system, and in that case, [MyHomeThings] has you covered.
The menu code is simple to modify and implement. It allows the user to define a certain number of menu items, along with button labels and functions to be executed with button presses. By default, it’s set up to work with left and right function buttons, with up and down buttons to toggle through the menu’s various entries. This suits the commonly available Arduino shields which combine a 16×2 character LCD with a set of four tactile buttons in a cross formation. However, modifying the code to use an alternate button scheme would be simple for those eager to tweak things to their liking.
For the absolute beginner to programming, it’s a great way to put together a simple interface for your microcontroller projects. It’s the sort of thing you might use if you’d built a do-everything Arduino handheld device, as we’ve seen built before. If you find text menus too archaic for your purposes, though, be sure to sound off with your favourite solutions in the comments.
While the SSD1306 OLED has somewhat become the go-to display for up-to-date projects, the good old character displays with their Hitachi HD44780 controller don’t seem to be disappearing just yet either. And why would they, especially if you want to show just text, having a built-in font has certainly its perk compared to worrying about integrating your own characters — which you can still do on top as well. Or perhaps you can combine both worlds, which is what [oldmaninSC] did with his digital clock that takes an entire 16×2 LCD to show each single digit.
The whole clock uses 16 individual, upright rotated 16×2 LCDs that are arranged in two rows of eight LCDs each, turning the entire construct sort of into a giant 8×2 display itself. For some additional information such as the date, there’s also a smaller font available that uses only half the height, allowing up to four total rows of information. To communicate with each LCD via I2C, two TCA9548A I2C multiplexers are connected to an Arduino, along with an RTC to keep track of the time and date itself.
As the TCA9548A has three pins dedicated to define its own address, the entire clock could be scaled up to a total of 64 LCDs — so how about a 16×4 display made out of 16×4 displays? Sure, adding smooth scrolling might become a bit tricky at some point, but imagine playing Tetris on that one!
Most Hackaday readers are likely to be familiar with character LCDs driven by the extremely common Hitachi HD44780 controller chip. If you’re looking for a cheap and easy way for your microcontroller project to display some data, they’re pretty much the go-to solution. But as popular as these displays are, there’s no denying that they’re starting to look a bit dated in 2020. Which is why the tweaks [Joseph Rautenbach] is working on are so interesting.
With one of these displays, the controller puts a single character on each 5×8 block of pixels. There’s also support for creating custom characters, which can be used for rudimentary icons. You’re pretty limited by the per-block resolution, but with a little imagination, you can usually get the point across. With a bit of dead space between each block of the display there’s little point in trying to make icons that “bridge” multiple blocks, as they’ll always be segmented.
But as [Joseph] realized, that’s less of a problem for scrolling text. So he wrote some code that takes an ASCII string and breaks it down into partial letters and numbers which can be displayed as custom characters. The controller only has space for 8 of these characters though, so the code needs to continually step through the string and generate the appropriate offset characters as the position of the text changes.
While the effect looks pretty good in the video after the break, [Joseph] has found that real-world utilization is a bit finicky. He tried the same code on one of the displays that uses white text on a blue background, and the scrolling text ended up ghosting together so it looked like gibberish. So while he’s released the source code for others to experiment with this trick, your mileage may vary.
While most people are satisfied with a calculator application on their smartphone these days, there’s still something to be said for the old fashioned desk calculator. Maybe it’s the fact the batteries last long enough that you can’t remember the last time you changed them, or the feel of physical buttons under your fingers. It could even be the fact that it keeps your expensive smartphone from needing to sit out on the workbench. Whatever the reason, it’s not uncommon to see a real-life calculator (or two) wherever solder smoke tends to congregate.
Which is precisely the idea behind this DIY calculator kit. Available from the usual overseas retailers for about $15 USD, it has some hobbyist-oriented features such as the ability to decode resistor color bands, convert hexadecimal numbers, and calculate resistor values for driving LEDs. If you’re going to keep a knock-around calculator on your bench, why not build the thing yourself?
Given the dual nature of this product, a DIY electronics kit and a functional desk calculator for electronic hobbyists, it seems only appropriate to review both aspects of it individually. Which is good, since there may be more to this product than just the sum of its parts.
It doesn’t speak standard HD44780, but rather a custom UART serial protocol, so if you’re looking for something to replace a busted LCD, this isn’t your bag. But if you are looking for a large UART terminal for debugging, with a nice aesthetic, you win.
We’d guess that a serial-to-Bluetooth converter could also be made to function, with a bit of work. The protocol is trivial too, meaning that almost any microcontroller could make use of it. All the code as well as the APK is available from the forum linked above, and there is a YouTube video of it in operation below.
The number one complaint in the comments is going to be that this doesn’t emulate a HD44780, so if that’s really what you want, read this deep-dive into the HD44780 and get hacking.
The venerable Commodore 64, is there anything it can’t do? Like many 1980s computer platforms, direct access to memory and peripherals makes hacking easy and fun. In particular, you’ll find serial & parallel ports are ripe for experimentation, but the Commodore has its expansion/cartridge port, too, and [Frank Buss] decided to hook it up to a two-line character LCD.
Using the expansion port for this duty is a little unconventional. Unlike the parallel port, the expansion port doesn’t have a stable output, as such. The port contains the data lines of the 6510 CPU and thus updates whenever RAM is read or written to, rather then updating in a controlled fashion like a parallel port does. However, [Frank] found a way around this – the IO1 and IO2 lines go low when certain areas of memory are written to. By combining these with latch circuitry, it’s possible to gain up to 16 parallel output lines – more than enough to drive a simple HD44780 display! It’s a testament to the flexibility of 74-series logic.
It’s all built on a C64 cartridge proto-board of [Frank]’s own design, and effort was made to ensure the LCD works with BASIC for easy experimentation. It’s a tidy mod that could easily be built into a nice enclosure and perhaps used as the basis for an 8-bit automation project. Someone’s gotta top that Amiga 2000 running the school district HVAC, after all!
The HD44780 is one of the first chips we learned about as a kid, and chances are good you’ve used one in your project at some point, and almost certain that you’ve interacted with one in your life. The character LCD is ubiquitous, easy to interface, and very robust. They come in sizes from 8 x 1 to 20 x 4 and even larger, but they almost all have the same pinout, and there are libraries in many embedded environments for interacting with them. [The 8-Bit Guy] decided to interface with one using just switches and a button, (YouTube, embedded) with the intent of illustrating exactly how to use them, and how easy they are.