HackSpace_-_April_2020

(Frankie) #1

Add a character display to your project


SCHOOL OF MAKING


Use Arduino or CircuitPython to display text


isplays come in all shapes and
sizes, and it’s not about there being
an overall ‘best’ display so much as
it is picking the right one for your
project. This month we’re going to
look at character LCDs, which are
cheap, widely available, and easy to program with
most development environments.
Almost all of these are controlled by Hitachi
HD44780 chips, and can take input in a couple of
forms. In their bare incarnation, they have a parallel
data bus which has 16 pins (though not all are needed),
but there are also versions with I^2 C or SPI input. We’ll
be looking at the basic version here as these are most
common, but if you need to connect a lot of displays
or are short of spare microcontroller pins, you might

Add a character display


to your project


Ben Everard


@ben_everard

Ben loves cutting stuff,
any stuff. There’s no
longer a shelf to store
these tools on (it’s now
two shelves), and the
door’s in danger.

want to take a look at the other versions. They come
in different sizes, but 16 character by two-line displays
are the most common, so we’ll focus on these.
Let’s start by looking at how to wire up these
displays. They generally all follow the same pinout,
but it’s always worth double-checking the data sheet
of your device to make sure it’s not any different.
Some devices can operate at 5 V, some at 3 V, and
some at both, so again, make sure you get the
right version for the microcontroller you have. The
important thing to remember is to power the device
with the same voltage as the logic, so if you have a
3.3 V microcontroller, make sure you power the LCD
with 3.3 V.
With the output pins at the top and the LCD screen
facing you, the pins are from left to right:

D


Above
This Adafruit display
has four lines and
an RGB backlight
to give a more
interesting display
Free download pdf