LCD-Display HD44780 20×4 under Openelec and Kodi(XBMC) at the Raspberry Pi

english/Manual in german

I bought a 20×4 Display with the HD44780-port.

The intension was to show information of a running OPENELEC (with Kodi/XBMC) on a display with HD44780-port.

2013-09-13 18.05.10

2013-09-13 18.05.40

 

The following table shows the wiring between Raspberry Pi and the Display.

HD44780 Pin Nr. Symbol Function RaspberryPi Pin RaspberryPi Symbol
1 VSS Power supply GND 6 GND
2 VDD Power supply +5V 2 +5V
3 V0 Contrast-voltage 6 GND
4 RS H=Data Register (RW); L=Instruction Register 26 GPIO 7
5 R/W Data managment line:H=Read; L=Write 6 GND
6 E Signal Enable 24 GPIO 8
7 DB0 Data line 0
8 DB1 Data line 1
9 DB2 Data line 2
10 DB3 Data line 3
11 DB4 Data line 4 22 GPIO 25
12 DB5 Data line 5 18 GPIO 24
13 DB6 Data line 6 16 GPIO 23
14 DB7 Data line 7 12 GPIO 18
15 LED+ Background-illumination + 2 +5V
16 LED- Background-illumination GND 6 GND

Between Pin3(HD44780) and PIN6(RPI) is a 10kOhm-Poti connected in order to adjust the contrast (required for must LCD, but not for VFD).

between Pin15(HD44780) und PIN2(RPI) is a 1kOhm-Poti connected to adjust the background-illumination.

At the beginning I made a small perboard for testing. Later I designed a pcb and milled it to build a more funded design.

 

Activating the Display

The following steps are required to activate the Display under Openelec with Kodi(XBMC):

  • I performed the download of the following three files
    • HD44780.so (HD44780 driver for Raspberry Pi)
    • HD44780.so (HD44780 driver for Raspberry Pi 2)
    • LCD.xml (LCD configuration file)
    • LCDd.conf (file to define witch content to display)
  • Transfer (copy) these three files to the SD-cart of you Raspberry to : “\\OPENELEC\downloads” (Please scroll down this page to find “Somes additional hints”)
  • Copy the LCDd.conf in the console using cp /storage/downloads/LCDd.conf /storage/.config/LCDd.conf.
    • If you didn´t use my file , search in the LCDd.conf the row DriverPath=/usr/lib/lcdproc/ and change it into DriverPath=/storage/downloads/.
    • then change the row Driver=*** to Driver=HD44780.
    • After that search the chapter ## Hitachi HD44780 driver ## und cange the follow Parameter
    • ConnectionType=rpi (for Raspberry Pi)
      ConnectionType=raspberrypi
      (for RaspberryPi 2)
    •  Size=20×4 (the size of your Display: number of characters x number of lines)
    •  GPIO-Ports can be assigned with:
      • D7=18
      • D6=23
      • D5=24
      • D4=25
      • RS=7
      • EN=8
      • The Number after the “=” is the GPIO-number and not the pin-number of the connector P1 on the Raspberry.
        (in example: D7=18 is GPIO18 and Pin12 at connector P1 on the Raspberry.)
  • In the Openelec-Setting of Kodi(XBMC) enable the LCD driver support and select the LCD-Driver “HD44780”.
  • In the ADD-ONs under services, download and activate “XBMC-LCDproc” (Later on you can configure in this ADD-ON settings like scroll speed and update interval.)
  • Reboot the Raspberry.

Now the Display should be working.

  • If the Display is not working, open a terminal or console and type the command LCDd -c /storage/.config/LCDd.conf -dhd44780-s true. It should respond with GPIO mapping information. This step is necessary especially if you corrupted your “LCDd.conf” by typo errors in-between or if it was not found during startup.
  • Reboot the Raspberry

In the file /storage/.kodi/userdata/LCD.xml you can edit what the display is showing. (In some older releases of OPENELEC with XBMC the path is: /storage/userdata/LCD.xml).

During startup it will take a few seconds until the display will begin to show its first characters.

During reboot of your Raspberry the Display is showing a readout of the loaded driver for a few seconds.

Have fun!

My files to download:

HD44780.so for Raspberry Pi

HD44780.so for Raspberry Pi 2

LCD.xml

LCDd.conf

 

Some additional hints:

Under Windows you can connect to the SD card of your Raspberry via “mapping a network drive” (smb) if your computer and your Raspberry are connected to the same network.

For Linux users the connection type SSH should be preferred.

Login is: “root”, PW: “openelec”.

The program “Putty” can be used to open a console from your PC on you Raspberry.

On some LCDs you need to adjust the contrast signal a lot (poti) in order to get any readout. Otherwise you risk to start trouble shooting at the wrong end.

 

VF-Display can be used as well as longs as it supports the HD44780 protocol. The Activation is the same. The wiring is almost the same (i.e no contrast signal).

A very big “Thank You” to Sven Georgi for his help to test and correct my manual.

Chantal Holzweiler, Heiko Berlin, Liiti Diest gefällt dieser Artikel

25 Kommentare

  1. maks maks
    23. April 2015    

    Hello
    I copy HD44780.so and LCD.xml to the download directory and thats it for both of the files. Is that right?

    I tried to use
    “LCDd -c /storage/.config/LCDd.conf -dhd44780-s true”
    but the error
    “Non-option arguments on the command line !
    Critical error while processing settings, abort.”
    occurred.

    Regards
    maks

    • 29. April 2015    

      Hi,

      You also need the LCD.conf
      If you work down the manual step by step the display should be work.
      The command “LCDd -c /storage/.config/LCDd.conf -dhd44780-s true” please without “.

      Regards
      Michael

  2. Ingo Ingo
    9. August 2015    

    Want to install such display, but the downloadlink for the Rpi2 .so file is corrupt?

    • 9. August 2015    

      Hi,

      I test it and it seems all works fine.
      I can download the file.

      • Ingo Ingo
        10. August 2015    

        I tried it again with IE, and now i can download it. Maybe a FF-Bug. Thanks for this good manual.

        • Ingo Ingo
          10. August 2015    

          I´m again, sorry. Can i use another pin instead of Gpio-pin 18. I have a HifiBerry Dac+ and that already use this pin.

          • 10. August 2015    

            Yes you can remap the GPIO-pin.
            Don’t forget to modify the LCDd.conf to your pin-config.
            Example: “D7=22” for GPIO22 at Pin15

          • Ingo Ingo
            11. August 2015    

            Sorry, i want to remap Gpio Pin18 to another but i can´t find the lines for the pins in the LCDd.Conf . Which line is that for Pin18

          • 12. August 2015    

            Hi,

            You can enter your assignment after line 451.
            My assignment is the standart assignment of the driver and don’t need to declare in the LCDd.conf.
            But i fill it in, new file can be download with the same link.

            Greetings
            Michael

          • ogivan ogivan
            24. Januar 2017    

            Hello,
            I have a problem with change pin assingment. I made everything according your manual some time ago. It worked perfect. But now I bought I2S DAC and must remap pin12 (GPIO18).
            It should be easy, I just made change in section [hd44780] of file LCDd.conf. D7=18 into D7=17. But despite remap and phisical pin change my LCD is blank. I was confused, and connect again DB7 into pin12 (GPIO18) and it seems that lcdproc not remap the pin.
            LCD operate on old value despite new in LCDd.conf
            I try first uninstall everything (with included LCDproc add-ons) and install again, but without success. I am not sure what i done wrong.
            Please give me a hint.

          • 30. Januar 2017    

            Hi,

            If you change pin12 to pin11 the remapping D7=18 into D7=17 should be work.

            Don’t forget the command ‘LCDd -c /storage/.config/LCDd.conf -dhd44780-s true’ after remapping.

            I hope your display work now.

            Best regards
            Michael

  3. Geraint Geraint
    2. Oktober 2015    

    This works perfectly. Thank You.

    Used this on RPi and RPi2. Both work

    Also works on my 16×2 hd44780 display. Just adjusted the ./config/LCDd.conf file from 20×4 to 16×2 and it worked great!

    Thanks

    Any chance you can look to do the same with Volumio?

    Cant get it working with that!

  4. Gian Gavino Gian Gavino
    5. März 2016    

    It works perfectly here. Thank You. RPi2, 16×2 hd44780. Openelec 6.0.3.

  5. Guillaume Guillaume
    21. September 2016    

    Instead of connect all GND on the RaspberryPi Pin #6, can we use #9 #14 #20 #25 #30 to avoid any additional PCB or soldering ?

  6. Guillaume Guillaume
    28. September 2016    

    Between Pin3(HD44780) and PIN6(RPI) the 10kOhm-Poti has to be also plugged on 5v ???

    • 28. September 2016    

      Pin 2 and 3 of the Poti is connected to PIN6(RPI)(GND) and Pin 1 of the Poti is connected to PIN3(HD44780)(V0)

  7. Christoph Christoph
    21. August 2017    

    Hi!

    The files are down. Could you please reupp them?

  8. ET ET
    3. September 2017    

    Hello, would it work on Raspberry pi 3 ?

    • 16. September 2017    

      Sorry, i have only the Raspi 1B and i know it works at raspi 2, but i dont know if it work on raspi 3.
      I think yes but it can be they need another driver as raspi 1 or 2.

    • 16. September 2017    

      Sorry for the late answer, but the mail notification didnt work.
      But it is fixed

  9. 6. November 2017    

    I like the valuable information you provide in your articles. I will bookmark your weblog and check again here regularly. I’m quite certain I’ll learn many new stuff right here! Good luck for the next!

No Pings Yet

  1. Display LCD HD44780 + Openelec + Raspberry Pi B+ | Raspberry PI on 16. Mai 2015 at 11:14

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.