[Howto] LCD HD44780 on Raspberry Pi 2

  1. In OSMC menu > Updating (Scan for updates now)

  2. sudo apt-get update
    sudo apt-get install lcdproc lcdproc-extra-drivers
    (select “Yes” perform auto config upgrade)

  3. sudo apt-get install dpkg-dev gcc

  4. sudo apt-get install build-essential

  5. Then Uninsall lcdproc:
    sudo apt-get remove lcdproc

  6. Reinstall lcdproc.
    sudo apt-get install lcdproc lcdproc-extra-drivers

  7. Then copied the patched hd47780.so file from here http://collaborate.osmc.tv/index.php/s/prPuDAFVUSk1wWT/download over the existing one in /usr/lib/arm-linux-gnueabihf/lcdproc/
    All thanks to goes to @mcobit for the working hd44780.so

  8. Then edited the configfile /etc/LCDd.conf to look like this:

    This file was written by cme command.

    You can run ‘cme edit ’ to modify this file.

    Run ‘cme list’ to get the list of applications available on your system

    You may also modify the content of this file with your favorite editor.

    #Driver=hd44780

    #DriverPath=/usr/lib/arm-linux-gnueabihf/lcdproc/

    Hitachi HD44780 driver

    [hd44780]
    ConnectionType=raspberrypi
    D7=18
    D6=23
    D5=24
    D4=25
    RS=7
    EN=8
    Size=16x2

    LCDd.conf

    This file contains the configuration for the LCDd server.

    The format is ini-file-like. It is divided into sections that start at

    markers that look like [section]. Comments are all line-based comments,

    and are lines that start with ‘#’ or ‘;’.

    The server has a ‘central’ section named [server]. Further each driver

    has a section which defines how the driver acts.

    The drivers are activated by specifiying them in a driver= line in the

    server section, like:

    Driver=curses

    This tells LCDd to use the curses driver. The first driver that is

    loaded and is capable of output becomes ‘the’ output driver.

    All extra drivers can only serve as input.

    The default driver to use is curses.

    The drivers can read their own options from the config file, but most of

    them don’t do this yet. They expect ‘command-line’-format parameters that

    were previously placed on the command line. These parameters can be

    given to the driver in the following way:

    Arguments=“place arguments here”

    The arguments between the quotes are passed to the driver.

    As said before these are the same arguments that the driver would have

    been passed under the old command line format of

    -d “”

    Note that the -d option still works, but not allows driverargs anymore.

    If -d is specified on the command line, the Driver= options in the

    config file are ignored.

    [server]

    Server section with all kinds of settings for the LCDd server

    #Driver=none
    #Driver=curses
    Driver=hd44780
    DriverPath=/usr/lib/arm-linux-gnueabihf/lcdproc/
    #Driver=lcdm001
    #Driver=MtxOrb
    #Driver=CFontz

    Tells the server to load the given drivers. Multiple lines can be given.

    NOTE: You may activate several input (input only) drivers but only ONE output

    driver, which should be the first.

    Bind=127.0.0.1

    Tells the driver to bind to the given interface

    Port=13666

    Listen on this specified port; defaults to 13666.

    #ReportLevel=5

    Sets the reporting level; defaults to 2 (warnings and errors only).

    ReportLevel=0 means NO DEBUG. This will avoid a flood of syslog …

    ReportToSyslog=no

    Should we report to syslog instead of stderr ? Default: no

    WaitTime=5

    Sets the default time in seconds to displays a screen.

    User=nobody

    User to run as. LCDd will drop its root priviledges,

    if any, and run as this user instead.

    ServerScreen=no

    Enables the built-in server screen [Default: no]

    yes : always,

    no : when there are no other screens active.

    Foreground=no

    The server will stay in the foreground if set to true.

    Otherwise the server will fork to background and report

    to syslog

    TIP: The following options can also be modified from the

    server menu (which requires a driver that supports input)

    Heartbeat=open

    The server has serveral heartbeat modes

    on Stays on all the time

    off Stays off all the time

    slash Rotating slash all the time

    open Can be controlled by all clients

    InitialHeartbeat=on

    This sets the initial heartbeat state if the heartbeat mode is “open”

    Affects the server screen only :wink:

    on Heartbeat activated

    off Heartbeat disabled

    slash Heartbeat replaced with a rotating slash

    Backlight=open

    The server has serveral backlight modes

    on Stays on all the time

    off Stays off all the time

    open Can be controlled by all clients

    InitialBacklight=on

    This sets the initial backlight state if the backlight mode is “open”

    Affects the server screen only :wink:

    BacklightBrightness=255

    This sets the backlight brightness in state “on”

    NOTE: Not all drivers/devices support setting the brightness this

    way. Some don’t support switching the backlight on/off at all,

    some can switch the backlight on or off only. If the latter is

    the case BacklightBrightness must be > 0.

    BacklightOffBrightness=0

    This sets the backlight brightness in state “off”

    NOTE: Not all drivers/devices support setting the brightness this

    way. Some don’t support switching the backlight on/off at all,

    some can switch the backlight on or off only. If the latter is

    the case BacklightBrightness must be = 0.

    [input]

    Input section with settings that are related to input handling

    NOTE: Not all drivers have input functionality

    keypad settings

    Keyname Function

    Normal context Menu context

    ------- -------------- ------------

    PauseKey Pause/Continue Enter/select

    BackKey Back(Go to previous screen) Up/Left

    ForwardKey Forward(Go to next screen) Down/Right

    MainMenuKey Open main menu Exit/Cancel

    #FreePauseKey=yes

    If set to yes, this prevents LCDd from handling the PauseKey itself

    #FreeBackKey=yes

    If set to yes, this prevents LCDd from handling the BackKey itself

    #FreeForwardKey=yes

    If set to yes, this prevents LCDd from handling the ForwardKey itself

    #FreeMainMenuKey=no

    If set to yes, this prevents LCDd from handling the MainMenuKey itself

    TIP: Even if you “free” the above keys, you can still use the menu

    provided you set FreeMainMenuKey=no

  9. Install LCDproc via OSMC
    In the OSMC manin menu got to Settings >> Add-ons >> Get add-ons >> XBMC/Kodi add-on repository >> Services >> XBMC LCDproc >> Install

  10. sudo /etc/init.d/LCDd restart

Done

2 Likes

Hi, I haven’t been lucky with my setup here. Everything worked fine until an update, I think November or December, not quite sure… I’m using a HifiBerry DAC+ as well, as soon as I install the LCDproc stuff, it stops working. I did change the GPIO pins in the LCDd.conf to the ones I’m acutally using for the LCD and are not used for the HifiBerry. As I mentioned, it all worked well before (LCD + HifiBerry).
My LCD doesn’t show any characters, any ideas for troubleshooting would be highly appreciated! :slightly_smiling:
Cheers!

Hello, i use this HOW TO and for RPI2 everything work fine but the same HOW TO uset for PI Zero dont work i use the same LCD and wiring and the sames GPIO pins. My LCD doesnt show any character.

Please Help!

Calin

Pi zero needs a different so file.

I am trying to get my HD44780 working on my Raspberry Pi Model B running OSMC using this method. But the download link to hd44780.so is now dead and I cant proceed to the next steps. Are there other sources where I can get the correct hd44870.so file? Thank you.