HD44780

     The HD44780 display is used very often in hobby projects, because it is cheap and gives a lot of possibilities. The display is most often in sizes 2×16 and 4×20, I will use 2×16 in this tutorial. This display has 2 lines of 16 chars. Each char consists of 40 pixels (5×8) and can display letters and graphics. If you want you can create your own character using the character generator HD44780 from our website.

Now let’s connect the display to Arduino and check how it works. First, connect the power to our display, Vss to gnd and Vdd to 5volt. Then plug in the backlight power supply so as not to damage the diode that illuminates our display, use a 220ohm resistor, A up to 5vol through the resistor and K to GND. Our display has the ability to adjust the contrast, it is done by adjusting the 10K ohm potentiometer. Connect the middle pin of the potentiometer to Vo. Now we need to connect the data lines: RS to 12, E to 11, D4 to 5, D5 to 4, D6 to 3, D7 to 2. Pin RW is used to set our display in read or write mode. To set it to permanent read mode, connect it to GND. Below you have the scheme available.

Connect the Arduino to the computer, you should see black rectangles on the display, if you can’t see them you need to set the potentiometer in such a position that they appear.
Before we proceed to upload the sketch to our arduino, we also need a library to operate our LiquidCrustal (Adafruit) display. Select: Tools -> Manage Libraries and enter LiquidCrustal in the search engine and install “by Android, Adafruit”.

Now we will discuss the sketch.

To use our library, we must add it to our project:

Then we need to initialize the library and specify the pins to which we connected our arduino:

In “Setup”, we need to specify the size of our display:

In “Loop” We set the cursor in position (5.0) and displayed the inscription HD44780, and in the second line we positioned the cursor in position (2.1) and displayed the inscription ForbiddenBit.

Now upload the sketch to your arduino:

If you’d like to create your own char for your display, use our char generator https://forbiddenbit.com/generator/custom-char-generator-for-hd44780/

Leave a Reply