Here is short VIDEO how it looks: http://www.youtube.com/watch?v=hzmBKdnMwf8

It is easiest and cheapest way to connect LCD to RPi - no need to use some special i2c interfaces.
All you need is cheap HD44780 display, your RPi and few cables.
Disclaimer – As usual I am not responsible if you damage your device so follow this tutorial at your own risk.
Hardware:
Connect your RPi to LCD as follow:
LCD D7 to RPi GPIO 18 (pin 12)
LCD D6 to RPi GPIO 23 (pin 16)
LCD D5 to RPi GPIO 24 (pin 18)
LCD D4 to RPi GPIO 25 (pin 22)
LCD E to RPi GPIO 8 (pin 24)
LCD RS to RPi GPIO 7 (pin 26)
LCD RW to RPi GND (pin 6)
LCD GND to RPi GND (pin 6)
LCD V0 to RPi GND (pin 6)
LCD +5V to RPi +5V (pin 2)
If your LCD has backlight, you can connect it to +5V and GND too.
This is the easiest way. You can put some resistors for brightness control etc.
There are many diagrams in the internet.
When you connect LCD GND, V0 and +5V you should see all upper row displaying rectangles.
Software:
There are two ways:
1. better but harder way:
You need to compile OpenELEC yourself. You need to patch it before compile.
Patch is based on Paul C. patch for lcdproc: http://lists.omnipotent.net/pipermail/l ... 14035.html
Link to patch: https://dl.dropbox.com/u/101429500/lcdp ... 2.patch.gz
Unpack and put patch into: /OpenELEC.tv/packages/sysutils/lcdproc/patches/
Edit: /OpenELEC.tv/projects/RPi/options
search for:
LCD_DRIVER="irtrans,imon,imonlcd,mdm166a,MtxOrb,lis"
and replace it by:
LCD_DRIVER="irtrans,imon,imonlcd,mdm166a,MtxOrb,lis,hd44780"
Edit: /OpenELEC.tv/packages/mediacenter/xbmc-addon-settings/source/resources
search for:
<setting id="LCD_DRIVER" type="labelenum" label="2051" values="none|irtrans|imon|imonlcd|mdm166a|MtxOrb" sort="yes" default="none" />
and replace it with:
<setting id="LCD_DRIVER" type="labelenum" label="2051" values="none|irtrans|imon|imonlcd|mdm166a|MtxOrb|hd44780" sort="yes" default="none" />
2. easier way, use my compilation, but you have to stay with this version (r11850), I rather will not upload newer.
Links for kernel and SYSTEM:
https://dl.dropbox.com/u/101429500/Open ... 850.kernel
https://dl.dropbox.com/u/101429500/Open ... 850.system
Rest is this same for both ways:
Upgrade your RPi (using fresh compilation or my files) and connect to it via ssh.
Edit /storage/.config/LCDd.conf
1. Replace Driver=something to Driver=hd44780
2. In ## Hitachi HD44780 driver ## section replace ConnectionType=something to ConnectionType=rpi, Size=something to your LCD size.
Restart XBMC and go to Programs -> OpenELEC OS Settings -> LCD/VFD and change it to hd44780
Thats all, your LCD should work.
Hope that this helps someone who wants to connect LCD to RPi.
Maybe this patch can be included in official OpenELEC builds, what makes it easier for everyone.
debugging:
run 'ps auxwww' and check for LCDd process. You should see line like this:
Code: Select all
948 root 0:35 LCDd -c /storage/.config/LCDd.conf -d hd44780 -s true
If you correctly connected LCD you should see Welcome message from LCDd on startup.
PS
This patch allows only connecting small displays (2x16, 2x20), it is not possible to connect 4x20 (with two Enable lines) at the moment.
