# [HOW-TO] Build a LCD Display and use it

## Camoes

BUILD A LCD DISPLAY AND USE IT

0) INTRODUCTION

The reason i built my self a LCD for my server is, that i'd like to monitor it without using a 2nd monitor or beeing sshed into it all the time. A LCD was perfect to display it's load, network-traffic and temperatures. In my opinion it's also more fun to build it yourself then buy an overpriced allready readymade LCD.

As i thought some other ppl might be interested in this also i decided to write this HOW-TO, so here we go.

1) THE HARDWARE PART

1.1 getting the right hardware

There are some LCD Displays who are supported by linux drivers, so you don't need to get one specific LCD, but at least you should check at LCDproc or lcd4linux if your LCD is supported. 

The most widespread displays are the one with a HD44780 Chip. They are supported very well by LCDproc and lcd4linux, cheaper then Cristalfontz displays for example and enough for my needs.

 :Exclamation:  THIS HOW-TO IS JUST FOR DISPLAYS WITH HD44780 CHIPS. If you use other hardware don't follow this hardware guide, i could COMPLETLY DESTROY your LCD !!!  :Exclamation: 

so what do we need ?

 1 LCD Display with HD44780 Chip (best would be a 20x4 Display)

 1 D-SUB Plug with 25 Pins

 1 ribbon cable with 25 wires

 1 10k Ohm pre-set potentiometer

 1 100 Ohm pre-set potentiometer

 1 power plug with 4 pins

you will also need 1 soldering gun (which should have a small tip, because you really need to do some fine work sometimes), solder and some patience  :Smile: 

1.2 The wiring scheme

[img:c4e5572ad7]http://www.camscode.org/images/lcd/th_schaltplan.jpg[/img:c4e5572ad7]

Click to enlarge

(image from moddingfaq.de)

 :Exclamation:   make sure to connect the 5V line really to the 5V of the power suply and NOT to the 12V line. Else it could damage or destroy your LCD !  :Exclamation: 

Best would be if you got a manual for your power suply to check where the 5V and Ground Lines are, but you can also check it with a voltmeter (but remember, fumbling around with a running power suply is allways dangerous)

Also note, that the D-SUB plug on the picture is shown from the front (!), so take care you solder the cable onto the plug right.

1.3 Connecting

Now as everything is done, we can connect the LCD to the PC. The D-Sub goes to your parallel port of course and the power-plug to one free cable from your power suply. If you did everything right you should see on a 20x2 display 1 row and on a 20x4 display 2 rows (the first and third line).

2) THE SOFTWARE PART

Now comes the easy part. There are 2 drivers for LCDs in portage right now, LCDproc and lcd4linux. As lcd4linux is not working for me i will just explain how to use LCDproc for now.

2.1 LCDproc

first of all you need to emerge it of course. A simple 

```
emerge lcdproc
```

 is enough.

Now we have to edit the config files. First we edit the LCDd.conf with 

```
nano -w /etc/LCDd.conf
```

Most things are allready right in this file, but some things need to be changed. The important lines and how the should look like:

```

#Driver=none

#Driver=curses

Driver=HD44780

#Driver=lcdm001

#Driver=MtxOrb

#Driver=CFontz

[HD44780]

                                                                              

Port=0x378

ConnectionType=winamp

Keypad=no

Backlight=no

Size=20x4

#DelayMult=2

DelayBus=true

```

If your parallel port has a different adress then 0x378 you have to change the Port option in the HD44780 section.

If your display has a different resolution then 20x4 you have to change the Size option in the HD44780 section.

now you can start LCDd with 

```
LCDd &
```

 as root. Your LCD should show something like Servers:0 Clients:0 after some time. Then you are nearly done !

Next do 

```
lcdproc -h
```

 to list the available displays by LCDproc. then start lcdproc with the options you like, for example: 

```
lcdproc C X D U
```

 or edit /etc/lcdproc.conf to autoload this options with a simple lcdproc.

To finish it, do 

```
rc-update add LCDd default
```

 to start the daemon at boot time and put lcdproc in your local.start.

2.2 lcdmod

lcdmod is a kernel module for LCDs at the parport. It has some advantages and disadvantages over LCDproc. The better stuff is that you can nearly everything display at your LCD as you can use it like a terminal, but there are no preconfigured displays or stuff so that you have to but some work in it (and have some knowledge about shell-programming or whatever) to get some nice output.

Sadly i didn't manage to get it to work on my PC so far, but i made an ebuild for it you might enjoy if you want to try it out. Here it is:

```

# Copyright 1999-2003 Gentoo Technologies, Inc.

# Distributed under the terms of the GNU General Public License v2

                                                                                

DESCRIPTION="Kernel module for LCDs at the parport"

SRC_URI="http://lcd-mod.sourceforge.net/dist/${P}.tgz"

HOMEPAGE="http://lcd-mod.sourceforge.net"

KV=${KV/linux-/}

                                                                                

SLOT="0"

LICENSE="GPL-2"

KEYWORDS="~x86"

                                                                                

src_compile(){

        emake || die "make failed"

}

                                                                                

src_install(){

        dodir /lib/modules/${KV}/misc

        insinto /lib/modules/${KV}/misc

        doins lcd.o

}

```

afterwards you should do a 

```
 echo "alias char-major-120 lcd" > /etc/modules.d/lcd
```

if you try something like

```
modprobe lcd

echo "Hello World" > /dev/lcd
```

 you should see the output on the display, if not, hola comrade !  :Wink: 

3) THE END

i hope you had fun with this HOW-TO and didn't fight to hard with my english  :Smile:  To give you a better idea what the result will look like i uploaded some pictures of my LCD at home

[img:c4e5572ad7]http://www.camscode.org/images/lcd/cpu.gif[/img:c4e5572ad7]

[img:c4e5572ad7]http://www.camscode.org/images/lcd/mem.gif[/img:c4e5572ad7]

[img:c4e5572ad7]http://www.camscode.org/images/lcd/uptime.gif[/img:c4e5572ad7]

----------

## Shadowline

Nice How-To, but would you happen to know how to get a CrystalFontz 634 USB lcd working ? I've searched high and low for a exact, easy to understand faq on this and have been unable to find diddly squat on this subject.   :Very Happy: 

----------

## Camoes

lcd4linux has an usblcd driver but it is just for LCDs with HD44780 Chip, but maybe it also works with Cristalfontz Displays although i doubt it.

----------

## ben_h

Ohhhhhh, wow. This is pretty darn excellent.

After seeing those shots of the LCD with little bar graphs and all, I simply don't have a choice. I'm doing this.

Thanks, an excellent HOWTO. I look foward to following it!

 :Cool: 

----------

## Blue Lightning

Also, for a barebones LCD device that you can cat directly to (it basically behaves like a terminal), try lcdmod.

----------

## Camoes

now that's great   :Cool: 

if i manage to do some usefull stuff with it i'll update the how-to

thanks for the tip  :Smile: 

----------

## oscrmyer

I did something very simular, but I cat files that I wanted to display. My next task to see if I can comp up with some type of mad to control the pc. Im think that I might try to build some type of MP3 applicance.

----------

## Camoes

i tried to use lcdmod and after some hassle at least the module loaded.

First of all i doesnt compile with 2.6 kernel, so i had to switch back, but for some reason i dont get any output on the display. lsmod also says the module is unused.

Maybe it is my wiring. Did you use LCDproc before, and if yes what wiring config did you use ? I'm kinda lost here   :Confused: 

But at least i made an ebuild for it, you can fetch it in my first post  :Smile: 

----------

## lizardloop

What do I do with the code for that ebuild posted in the first post? i.e how do I turn it into an ebuild I can install?

----------

## Onion Avenger

NICE!!!!

Now I know what my next project will be...

Thanks a bundle, Camoes!

----------

## Camoes

@lizardloop:

copy/paste the code in a new file called lcdmod-0.6.7.ebuild

activate the local portagedir in /etc/make.conf.

Do 

```

mkdir /usr/local/portage/app-misc

mkdir /usr/local/portage/app-misc/lcdmod

cp lcdmod-0.6.7.ebuild /usr/local/portage/app-misc/lcdmod

cd /usr/local/portage/app-misc/lcdmod

ebuild lcdmod-0.6.7.ebuild digest

ACCEPT_KEYWORDS="~x86" emerge lcdmod

```

----------

## Onion Avenger

Camoes: where did you get your LCD?

I found a few good ones at crystalfontz but they're all serial, not parallel...

----------

## Camoes

uhm at some electronics-store in germany, but i doubt this will help you  :Wink: 

----------

## Onion Avenger

 *Camoes wrote:*   

> uhm at some electronics-store in germany, but i doubt this will help you 

 

Yeah, it doesn't.  Thanks anyhow.

After much searching I found a 40x4 LCD at a good price  :Cool:  (though from a website that has a horrible ordering system).

I even found an article that details the procedure (hardware-wise) using the exact same model I found.  I'll place my order in a few days and hopefully do it over Thanksgiving break!  Ha ha wish me luck!   :Wink: 

Thanks for the info and the idea!

--Richie, the Onion Avenger

[EDIT] 

Alright, after some delays with EIO (probably because of their virus problem) they were super kind to me and now everything is okay - the majesty of a 40x4 LCD will grace my box in a few days....Last edited by Onion Avenger on Mon Nov 24, 2003 10:46 pm; edited 3 times in total

----------

## m33sb3w

Here is a 20x4, easy ordering, not bad shipping.  I ordered one today.  I just have to try this out.  Thanks Camoes!

Edit:  I just had to say something about the service...I ordered my LCD on Tuesday afternoon for $16 plus $3.85 shipping.  It was shipped from Oregon to me in Pennsylvania and I was AMAZED when I picked up my mail today, Thursday afternoon, only 50 hours after I placed the order, and the LCD was there waiting for me; it was also very well packaged.  If you want to try this project and you're in the US, this site is the way to go!

----------

## Forse

I was searching for this for a long time, thnx. I was wondering just are there any bigger displays supported by LCDproc or other software? I mean I want much bigger display, maybe like 240x128 Graphic LCD from http://www.crystalfontz.com/products/index-grph.html .

----------

## Stolz

Whay modules do I need for parallel port LCD to work?

I've selected

```
Device Drivers  --->

Parallel port support  --->

<M> Parallel port support

<M>   PC-style hardware
```

And then

```
modprobe parport parport_pc
```

but I don't have /dev/lp0 or /dev/lcdb or /parport0 or similar

Thanks in advice

----------

## Camoes

You also have to activate

```

Character Devices --->

     <M> Parallel Printer Support

    
```

----------

## Deebster

Anyone going to show us photos?  Gimme...

----------

## Stolz

 *Deebster wrote:*   

> Anyone going to show us photos?  Gimme...

 

[img:ec5fbfda72]http://personales.ya.com/gsmlandia/upload/lcd_4x20_blue.gif[/img:ec5fbfda72]

----------

## gschneider

has anybody tried putting the current emerge state on lcdproc?

something like this:

```
# emerge state #####

 package 

 categorie

 merging xx/yy     
```

----------

## Klovnen

anyone from norway who knows where to get this kind of lcds?

i have looked at elfa, but their website really suck, and my catalouge is.. ehm, gone  :Wink: 

----------

## Sibben

I would like to use a LCD (one of the larges types) as a monitor for my server, anyone knows if this can be done? My server is in a closet and it would be nice to have access to a simple bash-shell on a LCD for maintainance work.

----------

## Zkronk

 *Stolz wrote:*   

>  *Deebster wrote:*   Anyone going to show us photos?  Gimme... 
> 
> http://personales.ya.com/gsmlandia/upload/lcd_4x20_blue.gif

 

Is it a Linux- or Windows-software who is using the LCD?

----------

## Stolz

It's a windows' box.

Actually I'm using lcd4linux (CVS version) but it isn't so poweful.

----------

## angelacb

The blue type displays, anyone have any recommendations on where to buy them on the net and any recommendations + successful stories?

Best Regards,

----------

## Shadowline

http://www.crystalfontz.com

----------

## angelacb

Hi,

Thanx for the quick reply, did you ever get the "CrystalFontz 634 USB LCD" working? Or is USB a no go? Also, if i don't buy the Mounting brackets, is there still a connector on the back of the PBC of the module for the USB/Serial cable to connect to? As i noticed some of the LCDs by other brands requires it's user to do some soldering with a bunch of cables and some other accessories in order to have the power cables and Serial/USB cable connected and working. Hehe, i'm new to this, so I don't want to buy anything wrong.

Best Regards,

----------

## Shadowline

well.... it did work.... till I moved it to a different box...

But, yes it works fine and requires NO wireing job...

Just plug in the USB cable and BOOM.. it works

LCDproc and such are a bit of a pain and you should really use the cvs versions of them to make sure it's supported

----------

## angelacb

Hi,

Nice, thanx a lot for the tips. You mentioned earlier about using LCDproc the cvs versions, does it support reading stats from kernel 2.6? As I checked out the source code of lcd4linux, they don't seems to support the new structure of the /proc setup where the disk io stats are all kept in /proc/diskstats in a different format. So i was wondering if LCDproc would support Kernel 2.6, as they don't mention anything of sort on their site.

Best Regards,

----------

## Shadowline

no idea.... I used it with 2.4.23 I believe

Good luck....

----------

## angelacb

Hi,

Just to say thanx for all your help. I bought the 634 USB model (which supports serial as well) and have all the connectors ready to use. Got it working right away with the config mentioned in lcd4linux. Except for a problem from the /proc/stat where now disk stats are all in /proc/diskstats but i believe they're working on a fix soon (hopefully).

 :Confused:   the shipping from Fedex is pricy....lol...  :Embarassed: 

Best Regards,

----------

## MadBassist

there was a good article in a uk magazine called pc extreme detailing howto make an lcd, invert it AND backlight it all for like £35, to be fair im not too worried about fancy usb, parallel works ^_^ i even drilled a hole in a pci holding bracket thing (what are they really called) so the parallel cable can come out relatively neatly and theres not a huge hole in the case

----------

## Apex

I've bought myself the LCD, all I have to do now is... well uh, the rest.  :Laughing: 

----------

## b0fh

I'm looking for a lcd solution over usb, as my one and only parport is busy... I just found usblcd.de, but all displays are "out of stock". Is there any other linux-supported stuff for usb?

----------

## Stolz

AFAIK, Crystalfontz USB LCDs (www.crystalfontz.com ) are supported with lcd4linux.

----------

## Membris

Hello guys, I have bought my second LCD but I can't get it working.

In order to maintain clean this topic, I created a new one.

https://forums.gentoo.org/viewtopic-p-2171219.html

----------

## ticapix

Hi

I found a HD44780 LCD on a dead copying machine. It will be really great on my gentoo server which have no screen.

I would like to make the hardware part but I can't find any simple schematic on the web.

Maybe guys, you have archives with the schematic of the first post of this thread or maybe another schematic that works.

Thanks your reply.

Pierre

----------

## Stolz

 *ticapix wrote:*   

> Hi
> 
> I found a HD44780 LCD on a dead copying machine. It will be really great on my gentoo server which have no screen.
> 
> I would like to make the hardware part but I can't find any simple schematic on the web.
> ...

 

https://ssl.bulix.org/projects/lcd4linux/wiki/HD44780

----------

## ticapix

 *Stolz wrote:*   

> 
> 
> https://ssl.bulix.org/projects/lcd4linux/wiki/HD44780

 

Ok

In order to keep it as simple as possible, I wil take this schematic: https://ssl.bulix.org/projects/lcd4linux/attachment/wiki/HD44780/multiple.png?format=raw where I remove connections for a second LCD.

I have only 14 pin so I guess that I have no backlight control, I don't need the wire connected to the pin 16 with the resistors, transistor et potentiometer, no ?

For the alimentation, can I use the power directly from my parport ? (If I check it is really 5V)

Thanks

Pierre

----------

## Stolz

It has been 2 years since I did the PCB for my LCD, so I can't remember all the details. If you want to get better support, I suggest you tu subscribe to lcd4linux's mail list  :Smile: .

 *ticapix wrote:*   

> I have only 14 pin so I guess that I have no backlight control, I don't need the wire connected to the pin 16 with the resistors, transistor et potentiometer, no ?

 

If i can trust in my memory, yes, you don't need this wire.

 *ticapix wrote:*   

> For the alimentation, can I use the power directly from my parport ? (If I check it is really 5V)
> 
> 

 AFAIK, parport doesn't include a stable 5V line, you have to get it form your computer's power supply. Some people get it from the USB, but I don't recommend it.

----------

## Mattwolf7

Hey the images are not working, i found the orignal image here:

http://www.modding-faq.de/moddingfaq/lcd/lcdloeten/schaltplan.gif

----------

