Having an LCD Display looks quite smart. it can display the current time, media information and menu choices at a glance and with a little patience, are fairly simple to install. As an electronics novice, I managed to wire up an LCD panel fairly easily. The difficult part was getting the Pi to talk to the display. this was due to conflicting information on the net so hopefully with this guide you wont have the same frustrations I did.
What You Need
1.A Raspberry Pi with OSMC already installed.2.A terminal program such as PuTTy3.A GPIO Cable4.A breakout board for assembling and testing5.A breadboard for assembling and testing6.Some Jumper wires7.an LCD display board8.(Optional) A small PNP Transistor for backlight control9.(Optional) a 10K potentiometer for adjusting the contrastThe components you can get from your local Maplins store if you live in the UK. For the LCD board, I bought a DEM16217 board that cost about £16.99 although you can get a cheaper HD44780 board from eBay for only a few pounds, they both use the same software, the pins are only slightly different (On the DEM16217 the pinout has the backlight power, then the data pins while the HD44780 has the data pins, then the backlight power). I got the DEM board because I am an impatient sod. I have also recently purchased an HD44780 as well but for the moment I’m goign to use the DEM boardThe HD44780 also looks nicer than the DEM16217, it has a nice blue backlight and you can get a model with a larger display (4x20 compared to the DEM's 2x16)
Wiring it Up
For details on wiring up the display, I highly recommend Matthew Manning's website http://www.raspberrypi-spy.co.uk where he has a couple of great tutorials on wiring up the displays and testing them with a Python script. he has two tutorials for wiring up the Display, one simple and a slightly more advanced one for backlight control and contrast adjustment.A Simple LCD CircuitLCD Circuit with Backlight ControlI mainly followed the second tutorial, but didn't bother with the resistors on the backlight pins as the DEM16217 has the resistors already built in and with the the resistors in place, the backlight didn't come on at all, nor did I bother putting the potentiometers to control the brightness or contrast.This is how I connected it all up:LCD Pin LCD Function Pi Function Pi Pin no. L+ +5v +5v P1-02 L- GND Connect to PNP transistor Transistor Collector pin 1 GND GND P1-06 2 +5V +5V P1-023 ContrastGND P1-064 RS GPIO 7 P1-26 5 RW GND P1-06 6 E GPIO 8 P1-24 7 Data 0 Not used N/A 8 Data 1 Not used N/A 9Data 2 Not used N/A 10 Data 3 Not used N/A 11 Data 4 GPIO 25P1-22 12 Data 5 GPIO 24 P1-18 13 Data 6 GPIO 23 P1-16 14 Data 7 GPIO 18 P1-12 I connected the Emitter pin of the transistor to ground and the base to GPIO 11 (Pin P1-23) on the PI. This allows the Pi to turn the backlight on and offTo work out the positions on the pin, here is an image of the pin layout for the Revision 2 board of the PiSo after hooking all that up, I had this:So let's assume you have followed Matthews instructions and have the Display all wired up, we now have to look at how to get OSMC to talk to it.Configuring the Pi1.Use PuTTy to ssh to the PI2.Username and password are both osmc3.First we need to install the LCD software, at the prompt, type sudo apt-get install lcdproc lcdproc-extra-driversand press enter.Select Yes when prompted to autonconfigure4.Now type mkdir lcdprocand press enter5.Now type cd lcdproc and press enter to go into the directory you just made.6.If you are using a Pi 2 or 3, download this file:wget http://sourceforge.net/p/lcdproc/patches/_discuss/thread/4c659fe3/b8f3/attachment/hd44780.so7.IF you are using a Pi 1 run this commandwget -O /home/osmc/lcdproc/raspidrivers.tar.gz https://download.andypi.co.uk/raspdrivers.tar.gz and then Unpack the drivers using the command tar -xzvf raspdrivers.tar.gz8.Install the build-essentials package - sudo apt-get install build-essential9.Now we need to remove and then reinstall lcdproc10.sudo apt-get remove lcdproc11.sudo apt-get install lcdproc lcdproc-extra-drivers12.We need to edit the LCDd.conf file so type sudo nano /etc/LCDd.conf and press enter13.Edit the server section to read as follows:[server]DriverPath=/home/osmc/lcdproc/Driver=hd44780Bind=127.0.0.1Port=13666User=nobodyWaitTime=5ServerScreen=no14. Now add a new section at the bottom of the file as follows## Hitachi HD44780 driver ##[hd44780]# Select what type of connection. See documentation for types.ConnectionType=rpiD7=18D6=23D5=24D4=25RS=7EN=8BL=15Backlight=yesPort=0x378Speed=0Size=16x2If you have used different pins to connect to the LCD, this is where you can enter what pins are connected to which input. the BL line defines which pin is controlling the backlight. if you haven't wired up backlight control, don't bother with it. AT this point inn time the current HD44780 driver does not support the backlight function so it is pretty much a moot point.13.If you are using a Raspberry Pi 2 or 3, replace the line ConnectionType=rpi with ConnectionType=raspberrypi14.If you have the LCD wired for backlight control, change Backlight=no to Backlight=yes15.Use 'CTRL+X’ to exit and save the changes.16.Reboot the Pi, it should now display 'LCDProc Server' and a heartbeat symbol on the LCD display.17.In System>Settings, go to AddOns and then selectt "Get Addons" and select 'Kodi Addon Repository'18.Select 'Services' then down near the bottom of the list you should see "XBMC LCDProc", install and enable it.19.Congratulations, your LCD display should now be working!