Hitachi HD44780 compatible LCD screens are those common displays we see all over the place. Getting them to display some information is fairly easy, as all you have to do is send the appropriate bits to each of the LCD screen inputs.

Basic 16x2 Character LCD - HD44780 compatible

In this post I will describe the steps I took to integrate a Hitachi HD44780 LCD with the BeagleBone board. First of all you need a LCD display. From my Arduino days, I had a couple of them laying around my lab. In this tutorial, I used a fairly inexpensive Microtivity LCD Module 1602. Because this LCD module requires a 5V source, and the BeagleBone GPIO pins only provide 3.3V, you need to get power from other sources: either connect a 5V DC adaptor to the BeagleBone and use P9_5 which provides +5V, or use any adapter that you have in your house to deliver the appropriate voltage with a voltage regulator. If you opt for the voltage regulator route, I recommend you get a 9V adaptor and use this neat sparkfun kit, just make sure the ground of this external voltage supply is connected to the ground pin of the BeagleBone. Of course you can bypass all these problems, by getting a +3.3V LCD display, but they will be more expensive.

BeagleBone and a HD44780 compatible LCD

Once you have acquired the LCD and connected to an appropriate power source, use the following connections.

LCD Pin # LCD Pin Description LCD Pin Connects to
1 VSS Ground
2 VDD +5V
3 VO Attach a potentiometer here to adjust contrast
4 Register Select (RS) BeagleBone pin P8_4
5 Read/Write (R/W) Ground
6 Clock Enable (E) BeagleBone pin P8_3
7 Data Bit 0 Unconnected
8 Data Bit 1 Unconnected
9 Data Bit 2 Unconnected
10 Data Bit 3 Unconnected
11 Data Bit 4 BeagleBone pin P8_5
12 Data Bit 5 BeagleBone pin P8_11
13 Data Bit 6 BeagleBone pin P8_12
14 Data Bit 7 BeagleBone pin P8_14
15 Backlight Anode (+) +5V (or lower)
16 Backlight Cathode (-) Ground

The code below will prompt you to enter a bitstream into the LCD screen. Keep in mind that you need the library beagle_gpio.h, or else the program will not compile. You can find all the necessary files to run the program in the following github site ( You can compile, and run, this code by typing the following commands in the BeagleBone terminal:

gcc -c beagle_gpio.c
gcc beagle_gpio.o example_01.c
rm -f a.out

Once the code is compiled you will be asked to type the appropriate bitstream. If you type the following bits, you will type the word “hi” on the LCD.

Type the following bitstream to display "hi" in the LCD

If you would like to manually type different characters look at the following table:

HD44780 LCD character table

… And here is a screen shot of the program output.

Screenshot of the program manually sending a bitstream to the HD44780.

Finally, if you would like to know more about controlling these LCD devices I suggest this website, and the article “How to use intelligent L.C.D.s – Part One” by Julyan llett, which can be found here.

In a future post, I will release another library that will allow us to automatically display text without manually typing the entire bitstream.