Controlling Alphanumeric LCDs With Three Wires

shift

The HD44780 LCD controller is the defacto way of adding a small text display to your next project. If you need a way to display a few variables, a few lines of text, or adding a small user interface to a project, odds are you’ll be using one of these parallel LCDs. These displays require at least six control lines, and if you’re using a small microcontroller or are down to your last pins, you might want to think about controlling an LCD with a shift register.

[Matteo] used the ubiquitous ‘595 shift register configured as a serial to parallel converter to drive his LCD. Driving the LCD this way requires only three pins on the Arduino, [Matteo]’s microcontroller of choice.

For the software, [Matteo] modified the stock Arduino LiquidCrystal library and put it up on his Git. Most of the functions are left untouched, but for this build the LCD can only be used in its four bit mode. That’s not a problem for 99% of the time, but if you need custom characters on your LCD you can always connect another shift register.

If you just can’t spare three pins for a display, you could squeeze this down to just two, or add a second microcontroller for a one-wire-like interface.

Controlling Alphanumeric LCDs With Two Wires

LCD

The Hitachi HD44780 LCD controller is the most common interface to all those alphanumeric LCDs out there, and there are a million and one tutorials for connecting these displays to any microcontroller imaginable. This still doesn’t mean hooking up these displays is necessarily simple, though: you still need at least four wires for the data, at least two for control signals, and power and ground lines for connecting the LCD the traditional way.

Here’s a neat trick for connecting HD44780 displays that only needs two wires. In this setup there’s only a ground and power+data wire. The interesting part of this build is using the power pin to transmit serial data with an RS-232-like format. The only difference is keeping the data line at +5 V when idle; a reasonable-sized cap keeps the display and controller alive when the master microcontroller is transmitting.

This technique does require a bit of logic on the receiving end, which a small 8-pin PIC can handle with ease. Communication between a microcontroller and this “smart” LCD is done at 2400 bps, which even the wimpiest micro can handle. All the software to make this setup work are available here, and we expect an Atmel-based version to hit the Hackaday tip line shortly.

Trinket Contest Update #4

trinket-contest-update-4

Today is the last day to get your Trinket Contest entries into us! After the break you’ll find another dozen that were sent in. If you’re waiting to see your own appear here please be patient as we’ve got a lot to wade through.

The contest asks you slap the Hackaday logo onto something for a chance at winning one of 20 Trinket dev boards donated by Adafruit for this contest.

Continue reading “Trinket Contest Update #4”

Adding a display to a USB digital scale

arduino_scale

[Oleg] found himself in possession of a Stamps.com Model 510 5lb digital scale.  It’s a great scale, but only works as a USB HID device. In other words, it’s a digital scale without a digital display. He decided he wanted it to be more standalone, so he added a Toshiba HD44780 (compatible) display. An Arduino UNO and USB Host shield were used to make it happen. His sketch simply polls the scale and outputs the weight on the display.

In this case, he used the USB Host Shield from Circuits at Home, but a brief look shows they use the same MAX3421 controller chip as Sparkfun and other versions of the board. You might also be able to pull off the same functionality with an AVR running V-USB, though admittedly it wouldn’t be so easy.

We haven’t found a great way to add USB host mode to projects other than shields like the one [Oleg] used. If you know of a better way, share your ideas in the comments.

Of course, if this isn’t hardcore enough for you, forget using a consumer scale – make your own from scratch!

Liquid nitrogen (finally) makes an Arduino project cool

At $1.5 a liter in Moscow, [Michail] couldn’t resist buying some liquid nitrogen for himself. He thought that because Arduinos were quite popular among geeks, he’d try to overclock one while bringing its temperature down to -196°C/-320°F.

To check the ATmega was still working correctly, [Michail] designed several stability tests: SRAM read/write, flash read, arithmetic math and program flow tests (code with some conditionals). He used a standard HD44780 LCD to view the tests results but also an LED, blinking the number of the test it would have failed. The Arduino was externally clocked by a TTL-logic based square signal generator he designed, which can produce a clock between 16 and 100MHz. It turns out that you can run an Arduino at 65.3MHz when it is cooled with liquid nitrogen!

[Michail]’s article also explains what happens to the different on-board components when cooled with LN2: electrolytic capacitors becomes virtually non-existent, X7R capacitors’ impedance drop by 2/3, silicon diodes voltage drop increase by 50% and LED’s colors change. Check out the video below:

Continue reading “Liquid nitrogen (finally) makes an Arduino project cool”

A Video Game with custom LCD characters

LCD

[Nakul] wanted to build a video game, and with a few projects worth of Arduino experience decided he could finally attain his goal. He used a character LCD display to make his game, and instead of a text-based adventure, he went with a graphical side scroller.

The display for this space-based side scroller isn’t a graphical display like a CRT or a graphic LCD. Instead, [Nakul] is using the ubiquitous Hitachi HD44780 character LCD display. Normally these are used to display text, but they all have the ability to display custom 5 by 8 pixel characters. The code puts these custom characters – a spaceship, missile, and barrier – into the display’s memory and uses them as the sprites for the video game.

You can grab [Nakul]’s code over on his git or check out the action videos below.

Continue reading “A Video Game with custom LCD characters”