View previous topic :: View next topic |
Author |
Message |
Camoes Tux's lil' helper


Joined: 09 Jan 2003 Posts: 125 Location: Munich, Germany
|
Posted: Sun Oct 12, 2003 5:22 pm Post subject: [HOW-TO] Build a LCD Display and use it |
|
|
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.
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 !!!
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
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)
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 !
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 is enough.
Now we have to edit the config files. First we edit the LCDd.conf with Code: | 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:
Code: |
#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 as root. Your LCD should show something like Servers:0 Clients:0 after some time. Then you are nearly done !
Next do to list the available displays by LCDproc. then start lcdproc with the options you like, for example: or edit /etc/lcdproc.conf to autoload this options with a simple lcdproc.
To finish it, do Code: | 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:
Code: |
# 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 Code: | echo "alias char-major-120 lcd" > /etc/modules.d/lcd |
if you try something like
Code: | modprobe lcd
echo "Hello World" > /dev/lcd | you should see the output on the display, if not, hola comrade !
3) THE END
i hope you had fun with this HOW-TO and didn't fight to hard with my english 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] _________________ e = pi = 3
breakmygentoo
Last edited by Camoes on Wed Oct 15, 2003 2:00 am; edited 2 times in total |
|
Back to top |
|
 |
Shadowline n00b


Joined: 18 Sep 2003 Posts: 14
|
Posted: Sun Oct 12, 2003 11:27 pm Post subject: |
|
|
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.  |
|
Back to top |
|
 |
Camoes Tux's lil' helper


Joined: 09 Jan 2003 Posts: 125 Location: Munich, Germany
|
Posted: Sun Oct 12, 2003 11:46 pm Post subject: |
|
|
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. _________________ e = pi = 3
breakmygentoo |
|
Back to top |
|
 |
ben_h Tux's lil' helper


Joined: 26 Nov 2002 Posts: 118 Location: Australia
|
Posted: Mon Oct 13, 2003 12:36 am Post subject: |
|
|
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!
 |
|
Back to top |
|
 |
Blue Lightning Tux's lil' helper


Joined: 20 Jan 2003 Posts: 137 Location: Auckland, New Zealand
|
Posted: Tue Oct 14, 2003 7:21 am Post subject: |
|
|
Also, for a barebones LCD device that you can cat directly to (it basically behaves like a terminal), try lcdmod. |
|
Back to top |
|
 |
Camoes Tux's lil' helper


Joined: 09 Jan 2003 Posts: 125 Location: Munich, Germany
|
Posted: Tue Oct 14, 2003 10:46 am Post subject: |
|
|
now that's great
if i manage to do some usefull stuff with it i'll update the how-to
thanks for the tip  _________________ e = pi = 3
breakmygentoo |
|
Back to top |
|
 |
oscrmyer n00b


Joined: 21 Sep 2003 Posts: 31 Location: Seattle
|
Posted: Tue Oct 14, 2003 5:58 pm Post subject: |
|
|
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. _________________ I could be outside but its sunny |
|
Back to top |
|
 |
Camoes Tux's lil' helper


Joined: 09 Jan 2003 Posts: 125 Location: Munich, Germany
|
Posted: Wed Oct 15, 2003 1:53 am Post subject: |
|
|
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
But at least i made an ebuild for it, you can fetch it in my first post  _________________ e = pi = 3
breakmygentoo |
|
Back to top |
|
 |
lizardloop Apprentice

Joined: 16 Mar 2003 Posts: 278
|
Posted: Thu Nov 13, 2003 5:36 pm Post subject: |
|
|
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? |
|
Back to top |
|
 |
Onion Avenger Apprentice


Joined: 23 Apr 2003 Posts: 164 Location: New England
|
Posted: Sat Nov 15, 2003 6:44 pm Post subject: |
|
|
NICE!!!!
Now I know what my next project will be...
Thanks a bundle, Camoes! |
|
Back to top |
|
 |
Camoes Tux's lil' helper


Joined: 09 Jan 2003 Posts: 125 Location: Munich, Germany
|
Posted: Sat Nov 15, 2003 7:32 pm Post subject: |
|
|
@lizardloop:
copy/paste the code in a new file called lcdmod-0.6.7.ebuild
activate the local portagedir in /etc/make.conf.
Do
Code: |
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
|
_________________ e = pi = 3
breakmygentoo |
|
Back to top |
|
 |
Onion Avenger Apprentice


Joined: 23 Apr 2003 Posts: 164 Location: New England
|
Posted: Sat Nov 15, 2003 8:40 pm Post subject: |
|
|
Camoes: where did you get your LCD?
I found a few good ones at crystalfontz but they're all serial, not parallel... |
|
Back to top |
|
 |
Camoes Tux's lil' helper


Joined: 09 Jan 2003 Posts: 125 Location: Munich, Germany
|
Posted: Sat Nov 15, 2003 10:26 pm Post subject: |
|
|
uhm at some electronics-store in germany, but i doubt this will help you  _________________ e = pi = 3
breakmygentoo |
|
Back to top |
|
 |
Onion Avenger Apprentice


Joined: 23 Apr 2003 Posts: 164 Location: New England
|
Posted: Sat Nov 15, 2003 11:58 pm Post subject: |
|
|
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 (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!
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 |
|
Back to top |
|
 |
m33sb3w Tux's lil' helper


Joined: 18 Apr 2002 Posts: 96 Location: Villanova, PA
|
Posted: Wed Nov 19, 2003 5:15 am Post subject: |
|
|
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! |
|
Back to top |
|
 |
Forse Apprentice


Joined: 26 Dec 2002 Posts: 260 Location: /dev/random
|
Posted: Tue Feb 24, 2004 3:49 pm Post subject: |
|
|
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 . |
|
Back to top |
|
 |
Stolz Moderator


Joined: 19 Oct 2003 Posts: 3015 Location: Hong Kong
|
Posted: Thu Mar 04, 2004 4:48 am Post subject: |
|
|
Whay modules do I need for parallel port LCD to work?
I've selected
Code: | Device Drivers --->
Parallel port support --->
<M> Parallel port support
<M> PC-style hardware |
And then
Code: | modprobe parport parport_pc |
but I don't have /dev/lp0 or /dev/lcdb or /parport0 or similar
Thanks in advice |
|
Back to top |
|
 |
Camoes Tux's lil' helper


Joined: 09 Jan 2003 Posts: 125 Location: Munich, Germany
|
Posted: Thu Mar 04, 2004 10:51 am Post subject: |
|
|
You also have to activate
Code: |
Character Devices --->
<M> Parallel Printer Support
|
_________________ e = pi = 3
breakmygentoo |
|
Back to top |
|
 |
Deebster Tux's lil' helper


Joined: 16 Nov 2003 Posts: 126 Location: Reading, England
|
Posted: Thu Mar 04, 2004 10:10 pm Post subject: |
|
|
Anyone going to show us photos? Gimme... |
|
Back to top |
|
 |
Stolz Moderator


Joined: 19 Oct 2003 Posts: 3015 Location: Hong Kong
|
Posted: Wed Mar 10, 2004 10:21 am Post subject: |
|
|
Deebster wrote: | Anyone going to show us photos? Gimme... |
[img:ec5fbfda72]http://personales.ya.com/gsmlandia/upload/lcd_4x20_blue.gif[/img:ec5fbfda72] |
|
Back to top |
|
 |
gschneider Tux's lil' helper


Joined: 10 Apr 2002 Posts: 81 Location: Darmstadt, Germany
|
Posted: Thu Mar 11, 2004 2:09 pm Post subject: |
|
|
has anybody tried putting the current emerge state on lcdproc?
something like this:
Code: | # emerge state #####
package
categorie
merging xx/yy |
_________________ /(bb|[^b]{2})/ |
|
Back to top |
|
 |
Klovnen Tux's lil' helper


Joined: 01 Jan 2003 Posts: 83 Location: Norway
|
Posted: Fri Mar 12, 2004 4:57 pm Post subject: |
|
|
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  |
|
Back to top |
|
 |
Sibben n00b

Joined: 16 Nov 2003 Posts: 40 Location: Sweden
|
Posted: Fri Mar 12, 2004 8:30 pm Post subject: |
|
|
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. |
|
Back to top |
|
 |
Zkronk n00b

Joined: 23 Sep 2003 Posts: 12 Location: Uppsala, Sweden
|
Posted: Sat Mar 13, 2004 10:03 am Post subject: |
|
|
Is it a Linux- or Windows-software who is using the LCD? |
|
Back to top |
|
 |
Stolz Moderator


Joined: 19 Oct 2003 Posts: 3015 Location: Hong Kong
|
Posted: Sat Mar 13, 2004 11:00 am Post subject: |
|
|
It's a windows' box.
Actually I'm using lcd4linux (CVS version) but it isn't so poweful. |
|
Back to top |
|
 |
|