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.
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|
|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|
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
- 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:
- 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.
My files to download:
HD44780.so for Raspberry Pi
HD44780.so for Raspberry Pi 2
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).
Manual Raspberry Pi 4:
JGS give me a manual to install the display on a RaspberryPi4.
Thank you very much for the manual.
The setup on the Raspberry Pi v2 and 3 was quite cumbersome, requiring the user to employ a modified version of the hd47780.so. Getting the display to work on the Pi4 is quite straightforward, as long as you aren‘t used to the prior ways.
If you connected the display according to the tutorial above, you just have to install the LibreELEC add-ons XMBC lcdproc as well as lcdproc and set the driver to hd44780 in the latter.
In the LCDd.conf, which is located in storage/.kodi/userdata/addon_data/service.lcdd/ you have to set the ConnectionType to gpio (instead of rpi or raspberrypi as it was for older versions). The driver has of course to be set to hd44780, you can leave the DriverPath unchanged as it runs with the supplied driver (speaking of LibreELEC 9.2.6).
You also need to add the pin settings as described above, from this point on it should run practically out of the box.
Two things are to be noted:
1. Some users on different online forums use pin_D7=18 instead of D7=18, maybe consider this during troubleshooting.
2. If you activated SPI in the config.txt, you can‘t use GPIO 7 and 8 as they are used for SPI. You have to use a different setting in this case.