Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[HOW-TO] Build a LCD Display and use it
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Camoes
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jan 2003
Posts: 125
Location: Munich, Germany

PostPosted: Sun Oct 12, 2003 5:22 pm    Post subject: [HOW-TO] Build a LCD Display and use it Reply with quote

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
Code:
emerge lcdproc
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
Code:
LCDd &
as root. Your LCD should show something like Servers:0 Clients:0 after some time. Then you are nearly done !
Next do
Code:
lcdproc -h
to list the available displays by LCDproc. then start lcdproc with the options you like, for example:
Code:
lcdproc C X D U
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
View user's profile Send private message
Shadowline
n00b
n00b


Joined: 18 Sep 2003
Posts: 14

PostPosted: Sun Oct 12, 2003 11:27 pm    Post subject: Reply with quote

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. :D
Back to top
View user's profile Send private message
Camoes
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jan 2003
Posts: 125
Location: Munich, Germany

PostPosted: Sun Oct 12, 2003 11:46 pm    Post subject: Reply with quote

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
View user's profile Send private message
ben_h
Tux's lil' helper
Tux's lil' helper


Joined: 26 Nov 2002
Posts: 118
Location: Australia

PostPosted: Mon Oct 13, 2003 12:36 am    Post subject: Reply with quote

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!

8)
Back to top
View user's profile Send private message
Blue Lightning
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jan 2003
Posts: 137
Location: Auckland, New Zealand

PostPosted: Tue Oct 14, 2003 7:21 am    Post subject: Reply with quote

Also, for a barebones LCD device that you can cat directly to (it basically behaves like a terminal), try lcdmod.
Back to top
View user's profile Send private message
Camoes
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jan 2003
Posts: 125
Location: Munich, Germany

PostPosted: Tue Oct 14, 2003 10:46 am    Post subject: Reply with quote

now that's great 8)
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
View user's profile Send private message
oscrmyer
n00b
n00b


Joined: 21 Sep 2003
Posts: 31
Location: Seattle

PostPosted: Tue Oct 14, 2003 5:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
Camoes
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jan 2003
Posts: 125
Location: Munich, Germany

PostPosted: Wed Oct 15, 2003 1:53 am    Post subject: Reply with quote

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
View user's profile Send private message
lizardloop
Apprentice
Apprentice


Joined: 16 Mar 2003
Posts: 278

PostPosted: Thu Nov 13, 2003 5:36 pm    Post subject: Reply with quote

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
View user's profile Send private message
Onion Avenger
Apprentice
Apprentice


Joined: 23 Apr 2003
Posts: 164
Location: New England

PostPosted: Sat Nov 15, 2003 6:44 pm    Post subject: Reply with quote

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

Thanks a bundle, Camoes!
Back to top
View user's profile Send private message
Camoes
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jan 2003
Posts: 125
Location: Munich, Germany

PostPosted: Sat Nov 15, 2003 7:32 pm    Post subject: Reply with quote

@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
View user's profile Send private message
Onion Avenger
Apprentice
Apprentice


Joined: 23 Apr 2003
Posts: 164
Location: New England

PostPosted: Sat Nov 15, 2003 8:40 pm    Post subject: Reply with quote

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
View user's profile Send private message
Camoes
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jan 2003
Posts: 125
Location: Munich, Germany

PostPosted: Sat Nov 15, 2003 10:26 pm    Post subject: Reply with quote

uhm at some electronics-store in germany, but i doubt this will help you ;)
_________________
e = pi = 3
breakmygentoo
Back to top
View user's profile Send private message
Onion Avenger
Apprentice
Apprentice


Joined: 23 Apr 2003
Posts: 164
Location: New England

PostPosted: Sat Nov 15, 2003 11:58 pm    Post subject: Reply with quote

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 8) (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
Back to top
View user's profile Send private message
m33sb3w
Tux's lil' helper
Tux's lil' helper


Joined: 18 Apr 2002
Posts: 96
Location: Villanova, PA

PostPosted: Wed Nov 19, 2003 5:15 am    Post subject: Reply with quote

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
View user's profile Send private message
Forse
Apprentice
Apprentice


Joined: 26 Dec 2002
Posts: 260
Location: /dev/random

PostPosted: Tue Feb 24, 2004 3:49 pm    Post subject: Reply with quote

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
View user's profile Send private message
Stolz
Moderator
Moderator


Joined: 19 Oct 2003
Posts: 3015
Location: Hong Kong

PostPosted: Thu Mar 04, 2004 4:48 am    Post subject: Reply with quote

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
View user's profile Send private message
Camoes
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jan 2003
Posts: 125
Location: Munich, Germany

PostPosted: Thu Mar 04, 2004 10:51 am    Post subject: Reply with quote

You also have to activate
Code:

Character Devices --->
     <M> Parallel Printer Support
   

_________________
e = pi = 3
breakmygentoo
Back to top
View user's profile Send private message
Deebster
Tux's lil' helper
Tux's lil' helper


Joined: 16 Nov 2003
Posts: 126
Location: Reading, England

PostPosted: Thu Mar 04, 2004 10:10 pm    Post subject: Reply with quote

Anyone going to show us photos? Gimme...
Back to top
View user's profile Send private message
Stolz
Moderator
Moderator


Joined: 19 Oct 2003
Posts: 3015
Location: Hong Kong

PostPosted: Wed Mar 10, 2004 10:21 am    Post subject: Reply with quote

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
View user's profile Send private message
gschneider
Tux's lil' helper
Tux's lil' helper


Joined: 10 Apr 2002
Posts: 81
Location: Darmstadt, Germany

PostPosted: Thu Mar 11, 2004 2:09 pm    Post subject: Reply with quote

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
View user's profile Send private message
Klovnen
Tux's lil' helper
Tux's lil' helper


Joined: 01 Jan 2003
Posts: 83
Location: Norway

PostPosted: Fri Mar 12, 2004 4:57 pm    Post subject: Reply with quote

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
View user's profile Send private message
Sibben
n00b
n00b


Joined: 16 Nov 2003
Posts: 40
Location: Sweden

PostPosted: Fri Mar 12, 2004 8:30 pm    Post subject: Reply with quote

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
View user's profile Send private message
Zkronk
n00b
n00b


Joined: 23 Sep 2003
Posts: 12
Location: Uppsala, Sweden

PostPosted: Sat Mar 13, 2004 10:03 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
Stolz
Moderator
Moderator


Joined: 19 Oct 2003
Posts: 3015
Location: Hong Kong

PostPosted: Sat Mar 13, 2004 11:00 am    Post subject: Reply with quote

It's a windows' box.
Actually I'm using lcd4linux (CVS version) but it isn't so poweful.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum