NSLU2-Linux
view · edit · print · history

HowTo.AddATextDisplayOnI2CWithLCDproc History

Hide minor edits - Show changes to markup

April 05, 2009, at 07:12 PM by Matthias Goebl -- added image
Changed line 1 from:

With the hardware circuit on this page you can connect a HD44780 based display to your slug and display arbitray text with LCDproc

to:

With the hardware circuit on this page you can connect a HD44780 based display to your slug and display arbitray text with LCDproc.

Added lines 7-8:
March 07, 2009, at 04:50 PM by Matthias Goebl -- added links
Changed lines 5-6 from:

If you don't want to open your slug, you better buy an USB-LCD device that is supported by LCDproc.

to:

If you don't want to open your slug, you better buy an USB-LCD device that is supported by LCDproc, e.g. a AddPertelianLCD. If you want to program a PIC microcontroller, see AddAnLcdDisplayViaTheI2C.

Changed lines 93-94 from:
to:

See also the LCDproc documentation.

February 06, 2008, at 05:27 PM by Temp -- changed Link to LCDproc www.pcdproc.org to www.lcdproc.org
Changed line 54 from:

The I2C code is already in LCDproc in cvs (thanks to Peter). \\

to:

The I2C code is already in LCDproc in cvs (thanks to Peter). \\

February 06, 2008, at 05:27 PM by Temp -- changed Link to LCDproc www.pcdproc.org to www.lcdproc.org
Changed lines 5-6 from:

If you don't want to open your slug, you better buy an USB-LCD device that is supported by LCDproc.

to:

If you don't want to open your slug, you better buy an USB-LCD device that is supported by LCDproc.

February 06, 2008, at 05:27 PM by Temp -- changed Link to LCDproc www.pcdproc.org to www.lcdproc.org
February 13, 2006, at 12:00 AM by Matthias Goebl -- added meaningful content (circuit and documentation)
Changed lines 1-7 from:

patches have been submitted to lcdproc@lists.omnipotent.net

hardware description will follow

site is http://www.lcdproc.org

to:

With the hardware circuit on this page you can connect a HD44780 based display to your slug and display arbitray text with LCDproc You need to route the internal I2C port to an external connector, either this or that.

If you don't want to open your slug, you better buy an USB-LCD device that is supported by LCDproc.

The Interface Circuit

The I/O port expander used here is a PCF8574P.

                                       IC1
                                   -----------
                                  | PCF8574P  |
                                  | I2C-Port- |                            HD44780
                                  | Expander  |                            display
                                  |           |4
                                  |         P0|----------------------------o 11 D4
                                  |           |5
           I2C-Bus              14|         P1|----------------------------o 12 D5
    SCL o-------------------------|SCL        |6
                                  |         P2|----------------------------o 13 D6
                                15|           |7
    SDA o-------------------------|SDA      P3|----------------------------o 14 D7
                                  |           |9
                                  |1        P4|----------------------------o 4  RS
           Set I2C-Address  +-----|A0         |10
           here:            |     |2        P5|----------------------------o 5  RW
           GND: Bit:=0      +-----|A1         |11
           VCC: Bit:=1      |     |3        P6|----------------------------o 6  EN
                            +-----|A1         |                      ___
           Here: 0x00       |     |           |                 +---|___|--o 15 backlight
                           ===    |           |                 |c   10R
                                  |           |12    ___       b|/ 
                                  |13       P7|-----|___|-----|
                                 -|INT        |      1k       |\
                                  |           |           bc557 |e
                                   -----------                  |
                                                                |
    +5V o-----------+------------------+---------------------+--+----------o 2  VCC
                    |                  |                     |
                    |                  |                     |
                    |10uF              O 16                 .-.
                   ---                IC1                   | |<-----------o 3  Vlcd
                   ---                 O 8                  | |10k
                    |                  |                    '-'
                    |                  |                     |
    GND o-----------+-------+----------+---------------------+-------+-----o 1  GND
                            |                                        |
                           === GND                                   +-----o 16 GND Backlight

The Software

The I2C code is already in LCDproc in cvs (thanks to Peter).
If you are using openslug, you can simply bitbake lcdproc_0.4.99+cvs20060123.bb (thanks to Rene).

Here is an example configuration for /etc/LCDd.conf:

[server]
DriverPath=/usr/lib/lcdproc/
Driver=hd44780
[HD44780]
ConnectionType=i2c
Device=/dev/i2c-0
Port=0x20
Backlight=yes
Size=40x2
DelayBus=false
DelayMult=1
Keypad=no

Device is the device file for your I2C bus (here /dev/i2c-0). You need the kernel standard module i2c-dev and the bus driver - they are compiled into your kernel because of the realtime clock. DON'T load i2c chip modules (e.g. pcf8574)!

Port contains the i2c address of the i2c port expander (here 0x20, the PCF8574 from the example above, with all address bits set to 0). Bit 8 of the address (normally 0 in I2C addresses) given in port is special: It tells the driver to treat the device as PCA9554 or similar, a device that needs a 2-byte command, and it will be stripped off the address.

More examples of I2C port expander adresses:

port=0x20..0x27   PCF8574  with A[012]=0..7
port=0x38..0x3f   PCF8574A with A[012]=0..7
port=0xa0..0xa7   PCA9554  with A[012]=0..7
port=0xa0..0xa7   PCA9554A with A[012]=0..7
December 31, 2005, at 09:52 AM by Matthias Goebl -- inital version to show that work is in progress
Added lines 1-9:

patches have been submitted to lcdproc@lists.omnipotent.net

hardware description will follow

site is http://www.lcdproc.org

Matthias Goebl <matthias(dot)goebl(at)goebl(dot)net>

view · edit · print · history · Last edited by Matthias Goebl.
Based on work by Matthias Goebl and Temp.
Originally by Matthias Goebl.
Page last modified on April 05, 2009, at 07:12 PM