5
The Ultimate Guide to LCDproc 0.4.3
12
Copyright � 2002 by Rene Wagner
16
Permission is granted to copy, distribute and/or modify this document under
17
the terms of the GNU Free Documentation License, Version 1.1 or any later
18
version published by the Free Software Foundation; with no Invariant
19
Sections, with no Front-Cover texts, and with no Back-Cover Texts. A copy
20
of the license is included in the section entitled "GNU Free Documentation
24
---------------------------------------------------------------------------
31
The LCDproc Server - LCDd
32
The LCDproc "Main" Client - lcdproc
38
Download Last Day's CVS Version of LCDproc as a Tarball
39
Download The Latest Version of LCDproc from CVS
45
Install LCDproc Directly From The Sources
46
Generate And Install Packages of LCDproc
52
LCDd.conf: The [server] Section
53
LCDd.conf: The Drivers Section
55
The LCDproc Init Scripts
70
The Matrix Orbital Driver (MtxOrb)
72
Matrix Orbital LCD Modules
73
Matrix Orbital Hardware Installation
81
Running LCDd from the command line
82
The Command Line Options of LCDd
86
The Command Line Options of lcdproc
92
The LCDproc Mailing List
96
---------------------------------------------------------------------------
102
This document was meant as a tutorial for LCDproc users. It tries to
103
introduce you into the world of LCDproc giving you an overview of the
104
project. After reading this document you will be able to set up your own
107
Note Please note that this document is still "under construction". We hope
108
to finish it until the final release of LCDproc, which will probably
109
take place in May or June 2002. If you run into any trouble feel free
110
to write to the LCDproc mailing list. See http://
111
lcdproc.omnipotent.net/mail.php3 for details on how to subscribe to
114
This document was written for LCDproc 0.4.3. At the time of writing there
115
had already been the "LCDproc User's Guide" written by William W. Ferrel in
116
1998. William's stuff is copyright � 1998, William W. Ferrel. His version
117
covered an early version of LCDproc and therefore concentrated on Matrix
120
William's document was "recycled" for the description of the Matrix Orbital
121
display driver and for other parts of this document.
122
---------------------------------------------------------------------------
126
LCDproc is a client/server suite including drivers for all kinds of nifty
129
The server 'LCDd' makes it possible to display text and other data on an
130
LCD display. As well LCDd can handle certain input devices.
132
Support for devices is added by drivers. We distinguish between output and
133
input drivers. LCDd currently supports only one single output driver, which
134
may at the same time handle input. Nevertheless several input (only)
135
drivers are supported.
137
Currently there are drivers for several serial devices: Matrix Orbital,
138
Crystal Fontz, Bayrad, LB216, LCDM001 (kernelconcepts.de), Wirz-SLI and
139
PIC-an-LCD; and some devices connected to the LPT port: HD44780, STV5730,
140
T6963, SED1520 and SED1330. There are input (only) drivers for LIRC and
143
Clients can connect to LCDd through common sockets.
145
Various clients are available. The "main" client lcdproc, which is shipped
146
with the LCDproc distribution, can display things like CPU load, system
147
load, memory usage, uptime, and a lot more.
148
---------------------------------------------------------------------------
150
The LCDproc Server - LCDd
152
LCDd is one of those well known *NIX daemons. BUT it's not just *one*
153
daemon. It's the one that is supposed to drive your LCD ;)
155
LCDd can either be run from the command line or automatically by the init
156
scripts shipped with the distribution.
158
As other daemons, LCDd has to be configured. In this respect a lot has
159
changed since LCDproc 0.4.1. While LCDd retrieved all its configuration
160
settings from the command line in 0.4.1, it now has a configuration file,
161
which is normally /etc/LCDd.conf.
162
---------------------------------------------------------------------------
164
The LCDproc "Main" Client - lcdproc
166
While LCDd only offer the functionality of displaying text on a display,
167
lcdproc actually retrieves data worth displaying.
169
lcdproc gets its information from the /proc filesystem.
171
lcdproc can connect to an LCDproc server either on the local system or on a
172
remote system as long as it is reachable. It extracts the same statistics
173
regardless of where it sends this information. The statistics it gathers
174
include CPU utilization, memory utilization, disk utilization, network
175
utilization, system uptime, time, and date, and so on. It displays this
176
information in assorted ways, and can be tailored to taste.
177
---------------------------------------------------------------------------
179
Other LCDproc Clients
181
As it is rather simple to write an LCDproc client, you can find various
182
clients on the Internet.
184
Unfortunately we cannot provide a list of LCDproc clients (yet). So, have
185
fun searching google or freshmeat. Simply type 'lcdproc' for the keyword.
186
---------------------------------------------------------------------------
188
How to Obtain LCDproc
192
At the time of writing there were four versions of LCDproc floating around
196
LCDproc 0.4.1 was the last "stable" release of LCDproc. It still uses
197
the old command line configuration.
199
Warning There are known security problems with LCDproc 0.4.1. A remote
200
exploit is possible. An attacker can make use of some
201
buffer-overflows in the client communication code of LCDd, in
202
order to get root access to your system. Therefore running
203
LCDproc 0.4.1 is NOT RECOMMENDED!
206
LCDproc 0.4.2 was meant to be the next stable release of LCDproc. As
207
0.4.1 it uses the old command line configuration.
209
Note The known issues about 0.4.1 had been fixed. Unfortunately the guy
210
who had the last pending patches on his box kind of "vanished"
211
from the LCDproc mailing list. Of course you can get 0.4.2 from
212
CVS. BUT its current state is unknown.
215
LCDproc 0.4.3 will definitely be the next stable release of LCDproc. It
216
no longer uses the old command line configuration, but introduces the
217
configuration file /etc/LCDd.conf. As well the driver API has slightly
218
changed, which should not make older drivers incompatible, but might
219
cause some trouble. As well the way LCDd reports messages (including
220
error messages) has changed.
222
Note Even though LCDproc 0.4.3 is the most stable version we can offer,
223
it is still under developement. There has been a "feature freeze"
224
long time ago, but from time to time bugs are reported on the
225
mailing list, which are of course fixed. We also work on porting
226
drivers from 0.4.1 to 0.4.3 on demand. We do not have all the
227
hardware LCDd supports. So, we only work on drivers that can be
231
LCDproc 0.5 is the developement version of LCDproc. Everything is
232
possible ;) Drivers can already be loaded at runtime. We will also work
233
on client supplied menus and other nifty stuff.
235
Warning From time to time LCDproc 0.5 might not even compile due to
236
drastic changes. You have been warned!
238
Furthermore older drivers will NOT work with LCDproc 0.5 AT
239
ALL! Feel free to port a driver that has not been ported to 0.5
243
---------------------------------------------------------------------------
245
Download Last Day's CVS Version of LCDproc as a Tarball
247
There are nightly distributions of the CVS branches of LCDproc. You can
248
download them from http://lcdproc.sourceforge.net/nightly/
250
To extract the files run either
251
$ tar xvfz lcdproc-CVS-*.tar.gz
254
$ bunzip2 -c lcdproc-CVS-*.tar.bz2 | tar xv
255
---------------------------------------------------------------------------
257
Download The Latest Version of LCDproc from CVS
259
Of course you can download the latest stuff from CVS via anonymous login.
261
Create a "cvs" directory somewhere on your machine (not really neccessary
267
$ cvs -d:pserver:anonymous@cvs.lcdproc.sourceforge.net:/cvsroot/lcdproc login
269
(Hit enter when prompted for a password.)
271
Get the files from CVS:
272
$ cvs -d:pserver:anonymous@cvs.lcdproc.sourceforge.net:/cvsroot/lcdproc checkout -r stable-0-4-3 lcdproc
274
Once you've done that and want to update the downloaded files to the latest
275
stuff you can use the "update" command of CVS (Make sure you have logged in
277
$ cvs -d:pserver:anonymous@cvs.lcdproc.sourceforge.net:/cvsroot/lcdproc update -r stable-0-4-3 lcdproc
279
Now that you have downloaded the files you can prepare them for compiling,
280
but first you should (you don't have to) copy them to another place on your
282
$ mkdir ~/lcdproc-cvs
283
$ cp -f -R ~/cvs/lcdproc ~/lcdproc-cvs/`date +%Y%m%d`
284
$ cd ~/lcdproc-cvs/`date +%Y%m%d`
285
---------------------------------------------------------------------------
289
Debian GNU/Linux users can get the debian package of LCDproc, which is in
290
the unstable and testing distributions.
292
Provided apt-get is configured properly. You should be able to install the
296
# apt-get install lcdproc
297
---------------------------------------------------------------------------
303
Now that you have downloaded the LCDproc distribution you can start
306
Note If you have installed the debian package with apt-get (or another
307
debian tool), you can skip this this chapter.
309
If you're building this version from CVS, you'll need autoconf, automake,
310
aclocal & autoheader installed.
312
If you have autoconf and friends, run:
315
This produces the configure script and supporting files. It has allready
316
been run if you using the tarball distribution.
318
Once the above command has run, the rest is pretty standard:
321
Read about the options, figure out what to use.
322
$ ./configure --prefix=/usr/local --enable-drivers=ncurses,cfontz
324
Be sure to replace /usr/local with the prefixdir you want (e.g. /usr for
325
RedHat) and ncurses,cfontz with comma-separated list of drivers you want.
328
Congratulations: You have just compiled your version of LCDproc ;)
329
---------------------------------------------------------------------------
331
Install LCDproc Directly From The Sources
333
If you want to install LCDproc more or less permanently you can run:
338
Note make install is absolutely OPTIONAL You can also run LCDproc directly
339
from the source directory. See below for details.
340
---------------------------------------------------------------------------
342
Generate And Install Packages of LCDproc
344
As an alternative (which is actually better ;) to installing directly from
345
the sources you can generate packages using the packaging tool EPM.
347
First of all you may need to download EPM from http://www.easysw.com/epm/
348
and install it according to the instructions that are included in its
351
Note There are of course other and maybe better ways to generate packages
352
for your system. The reason for us to choose EPM was that it provide
353
the developers with a tool that makes it possible to write one list
354
file for all platforms defining what the resulting package is meant to
355
look like. This way we do not have to learn all the package managing
356
tools of the different platforms that are supported by LCDproc.
358
To generate an LCDproc package follow these instructions:
360
Tip It is of certain importance that you have run ./configure with the
361
correct pathname settings for your system. Otherwise the resulting
362
package will install the files in the wrong directories.
363
$ epm -v -f native LCDproc
365
Note Generating an RPM package as a non-root user will fail, RPM wants to
366
generate the files from the tree under /usr/src/RPM, which you do not
367
have write access to as a non-root user. If you want to generate the
368
package as a non-root user anyway, you may want to follow these
371
A workaround for the described problem is creating a file named ~
372
/.rpmmacros which contains:
375
Important ~/rpm must contain the same tree usually found under /usr/src/RPM
377
Unfortunately epm does not read ~/.rpmmacros and of course returns
378
warnings. Don't worry! That's OK ;)
380
In order to actually install the generated package follow the instructions
381
in your system's manual.
382
---------------------------------------------------------------------------
384
LCDproc Configuration
388
As mentioned in the introduction LCDd, the LCDproc server, now (with
389
version 0.4.3 of LCDproc) has its own configuration file, which is normally
392
Note If you have not installed LCDproc from the sources the configuration
393
file might have a different location. You should find it when making
394
your system's package manager list all the files in the LCDproc
397
The format of the /etc/LCDd.conf is ini-file-like.
399
It is divided into sections that start at markers that look like [section].
400
Comments are all line-based comments, and are lines that start with '#' or
403
The server has a 'central' section named [server]. Further each driver has
404
a section which defines how the driver acts. Those sections start with
407
The drivers are activated by specifiying them in a driver= line in the
408
server section, like:
411
Example 1. LCDd.conf: Specify which driver to use
414
This tells LCDd to use the curses driver. The first driver specified here
415
must be 'the' output driver. Currently LCDd will exit when several output
416
drivers have been specified here. All extra drivers can only serve as
417
input. The default driver to use is curses.
419
Warning If LCDd is started automatically by an init-script using the curses
420
drivers will lock /dev/tty1! So, be careful about what you are
423
The drivers can read their own options from the config file, but most of
424
them don't do this yet. They expect 'command-line'-format parameters that
425
were previously placed on the command line. These parameters can be given
426
to the driver in the following way:
429
Example 2. LCDd.conf: Compatibility mode for drivers written for 0.4.1
b'Arguments="place arguments here"'
432
The arguments between the quotes are passed to the driver. As said before
433
these are the same arguments that the driver would have been passed under
434
the old command line format of
436
LCDd -d driver "driverargs"
438
Note The -d option still works, but does not allow driverargs any more.
440
If -d is specified on the command line, the Driver= options in the
441
config file are ignored.
442
---------------------------------------------------------------------------
444
LCDd.conf: The [server] Section
446
The [server] section of the LCDd.conf contains the settings for the LCDproc
450
Tells the server which driver(s) to use. See above for details
452
Note The default setting is Driver=none which makes the server exit
453
right after the start. This is neccessary to avoid trouble with
454
package installations.
457
Tells the server to bind to the given interface. Default to Bind=
458
127.0.0.1 which is actually the safest variant.
461
Tells the server to listen to this specified port; defaults to 13666.
464
Sets the reporting level; defaults to 2 (warnings and errors only).
467
Should we report to syslog instead of stderr ? Defaults to no.
470
Sets the default time in seconds to display a screen.
473
User to run as. LCDd will drop its root privileges, if any, and run as
474
this user instead. Defaults to User=nobody.
476
Note If you want to use the server menu, to shutdown or reboot your
477
system, you will have to set this to root. Otherwise LCDd does not
478
have the privileges to run commands like init 6.
481
Enables the server screen even when other screens are active. Defaults
485
The server will stay in the foreground if set to true. Otherwise the
486
server will fork to background and report to syslog. Defaults to yes.
489
---------------------------------------------------------------------------
491
LCDd.conf: The Drivers Section
493
As mentioned earlier, each driver has its own section in the LCDd.conf.
495
The settings are more or less self-explanatory. So, read through the
496
section of your driver and change everything neccessary.
497
---------------------------------------------------------------------------
499
The LCDproc Init Scripts
501
The LCDproc distribution contains init scripts for RedHat- and Debian-based
502
GNU/Linux distributions. You can find them in the docs/ directory of the
505
Note The init scripts are generated using autoconf. So, again it is
506
important that you have run ./configure with the correct options for
509
Refer to your system's manual on how to install the scripts.
510
---------------------------------------------------------------------------
514
The file scripts/init-LCDd.* is the init script for the LCDproc server
515
LCDd. It does not require modification.
516
---------------------------------------------------------------------------
520
The file scripts/init-lcdproc.* is the init script for the LCDproc "main"
521
client lcdproc. As lcdproc does not (yet) have a configuration file you may
522
want to modify the options that are passed to lcdproc.
524
Note You can retrieve a listing of all options of lcdproc running lcdproc
528
Example 3. init-lcdproc.debian: Modify the option passed to lcdproc
b'start-stop-daemon --start --quiet --background --exec ${lcdproc} -- C'
532
In this example lcdproc will only send information on the CPU usage to the
536
Example 4. init-lcdproc.rpm: Modify the option passed to lcdproc (RedHat)
b'daemon ${lcdproc} C X &'
539
In this example lcdproc will only send information on the CPU usage [C] and
540
system load [X] to the server.
541
---------------------------------------------------------------------------
545
This chapter contains the documentation of each LCDproc driver, which may
546
include the installation process of the hardware as well as the
547
configuration of LCDd.
548
---------------------------------------------------------------------------
552
There are several ways of wiring up the HD44780 devices. Your choice will
553
probably be governed largely by your ability to wire up each one and/or a
554
desire to use the device with other programs.
556
The LCDproc HD44780 driver supports the following connections on a parallel
561
* 8-bit (winamp style)
563
* extended 8-bit (LCD + LED bargraph)
568
And supports a PIC-an-LCD connected to a serial port.
570
The driver also lets you use multiple displays as a single virtual display.
571
For example, a 4, 2 and 1 line display can be used to form a 7 line
572
display. The number of displays is limited by the individual HD44780
574
---------------------------------------------------------------------------
578
Common connections for all connectiontypes
580
No matter what connectiontype you choose, you will always need some
581
connections. They are explaned here.
582
---------------------------------------------------------------------------
586
All variants use the same method of obtaining power. i.e., for each LCD:
589
Table 1. HD44780: Power Connections
590
+------------+------+-----------------------------------------------------+
592
+------------+------+-----------------------------------------------------+
593
| LCD | pin | signal |
594
+------------+------+-----------------------------------------------------+
596
+------------+------+-----------------------------------------------------+
597
| 1 | GND | (connect to any of pins 18 - 25 of you parallel |
599
+------------+------+-----------------------------------------------------+
601
+------------+------+-----------------------------------------------------+
602
| 3 | Vadj | (contrast) |
603
+------------+------+-----------------------------------------------------+
605
+------------+------+-----------------------------------------------------+
607
Warning Always double check your power connection, your display will
608
probably NOT survive a reversely connected supply !
610
There are several ways to get 5V:
612
* Connect to a 5V line intented for disk drives (the red wire is 5V,
615
* Get it from a joystick port (pin 1 and 9 are 5V, 4, 5 and 12 are GND).
616
It seems that some soundcards can use these lines for communication, so
617
if you want to use this first check wether it really gives a 'clean'
620
* If you don't have a backlight, you can sometimes get the needed mA's
621
from the LPT port itself. Connect a few diodes from the data pins to a
622
capacitor and you have the 5V. If it's strong enough is another
625
* Get it from the keyboard connector. I do not recommend to use this with
626
a backlight, as the keyboard connector is often protected with a fuse
0
631
(variable resistor)
633
Vcc ---| 10k |--- GND
640
Figure 1. HD44780: Connecting the contrast adjusting pin (Vadj.)
641
---------------------------------------------------------------------------
645
You can connect a keypad with all connection types. The maximum supported
646
number of keys differs per type. There are several ways to connect the keys
648
---------------------------------------------------------------------------
652
If you connect a key like sketched below, then you can only connect one key
653
per input pin. It is a simple solution if you need only few keys.
663
+-----------o input (X)
674
Figure 2. HD44780: Direct Keys
676
By default, the following keystrokes are generated by the different keys:
679
Table 2. HD44780: Default Keystrokes
693
---------------------------------------------------------------------------
697
Using a matrix, we can connect much more keys. To simplify the drawing
698
here, we replace all switches with an @ symbol:
714
Figure 3. HD44780: Single Matrix Key
716
We connect the matrix of keys like this:
723
Y3 o---|<---@--@--@ O 5V
726
1N4148 +----------|___|---+
730
| | +----|___|---+ resistors 22k
736
Figure 4. HD44780: Complete Key Matrix
738
As you can see, you need 1 resistor per X line, and 1 diode per Y line.
739
Lcdproc will presume that you have a keypad with a layout like a telephone
740
connected, with X and Y lines connected as show. To be more precise, it
751
Figure 5. HD44780: Keypad Layout
753
If you only need 10 keys, leave the rest away. However, the lcdproc menu is
754
controlled by the keystrokes A to D. You should modify and recompile the
755
driver to get an other keypad layout.
757
You can buy arrays of keys that are connected like this in the electronics
758
shop. They usually call it a matrix keypad. To hook it to lcdproc, you
759
would only need to add the resistors and diodes.
761
If you want to use just one return line, for example with the serialLpt
762
wiring, it looks (completely drawn) like this:
777
Y3 o---|<---o o---+----o return line
779
Figure 6. HD44780: One Return Line
781
Tip If the driver generates keypresses without that you actually press a
782
key, it might be that the unconnected input lines are picking up
783
electromagnetic waves from the air. In that case connect the
784
unconnected input lines (pin 10, 11, 12, 13 and 15 of the LPT) to VCC =
786
---------------------------------------------------------------------------
790
A small extension allows you to switch the backlight of the display on and
791
off. At the moment only the 4bit and winamp connection types support this.
792
The extension uses one output pin, you cannot use that pin for other
793
functions anymore. The wiring looks like this:
798
LPT Sub-D connector | 4k7 |
801
BL pin o------------|___|---+---------|
806
+--------o 15 backlight
808
+--------o 16 GND backlight
812
Note: 4k7 means 4,7 kohm.
813
The BC327 transistor has the following connections:
825
Figure 7. HD44780: Backlight Wiring
827
Caution Sometimes the backlight connections are not on the 'main'
828
connector, but on the side. If that is the case, there is usually
829
NO RESISTOR present to limit the current through the LEDs. Therefor
830
you should then add a resistor after the transistor of about 10 ohm
831
(see display documentation).
833
Tip If you want the backlight to light a bit while it's switched 'off', you
834
can add a resistor bypassing the transistor from e to c, with a value
835
of, say 47ohm or 22ohm. (My 4x20 has an internal resistor of 6ohm, so
836
with 47 ohm extra it lights at only 1/9th. I like this. Joris.)
837
---------------------------------------------------------------------------
841
This is originally based on "lcdtext" (by Matthias Prinke).
844
Table 3. HD44780: 4-bit Pinouts (1)
845
+---------------------------+---------------------------------------------+
847
+---------------------------+---------------------------------------------+
848
| printer port | LCD |
849
+---------------------------+---------------------------------------------+
851
+---------------------------+---------------------------------------------+
853
+---------------------------+---------------------------------------------+
855
+---------------------------+---------------------------------------------+
857
+---------------------------+---------------------------------------------+
859
+---------------------------+---------------------------------------------+
861
+---------------------------+---------------------------------------------+
862
| D5 (7) | RW (5) (LCD3 - 6) (optional - pull all LCD |
864
+---------------------------+---------------------------------------------+
866
+---------------------------+---------------------------------------------+
867
| D7 (9) | EN2 (LCD2 - 6) (optional) |
868
+---------------------------+---------------------------------------------+
870
+---------------------------+---------------------------------------------+
872
If you want to connect more than two displays to the parallel port then
873
wire D5 (pin 7) to the enable line (pin 6) of the third LCD. Then for
874
displays four to seven use:
877
Table 4. HD44780: 4-bit Pinouts (2)
878
+----------------+-------+
880
+----------------+-------+
881
| printer port | LCD |
882
+----------------+-------+
884
+----------------+-------+
886
+----------------+-------+
888
+----------------+-------+
890
+----------------+-------+
892
+----------------+-------+
894
+----------------+-------+
896
The optional keypad can be connected as follows:
899
Table 5. HD44780: 4-bit Keypad Pinouts
900
+-----------------+-------+
902
+-----------------+-------+
903
| printer port | LCD |
904
+-----------------+-------+
906
+-----------------+-------+
908
+-----------------+-------+
910
+-----------------+-------+
912
+-----------------+-------+
914
+-----------------+-------+
916
+-----------------+-------+
918
+-----------------+-------+
920
+-----------------+-------+
922
+-----------------+-------+
924
+-----------------+-------+
926
+-----------------+-------+
928
+-----------------+-------+
930
+-----------------+-------+
932
+-----------------+-------+
933
| PAPEREND (12) | X2 |
934
+-----------------+-------+
936
+-----------------+-------+
938
+-----------------+-------+
940
+-----------------+-------+
942
The optional backlight wiring should be connected to D5, pin 7.
943
---------------------------------------------------------------------------
947
This type of connection should work with winamp.
960
nLF (14) nRW (5) (EN3 6 - LCD 3) (optional)
962
nSEL (17) EN2 (6 - LCD 2) (optional)
965
Figure 8. HD44780: "Winamp" wiring
967
If you want the display to work with the Winamp plugin, wire nLF (pin 14)
968
to nRW of your LCD. You can then use the plugin in bidirectional mode (wich
969
is much faster). With 3 connected LCDs this is not possible. Note from
970
Benjamin: I haven't tried using winamp while having the third LCD connected
973
The optional keypad can be connected as follows:
14
975
printer port keypad
995
Figure 9. HD44780: "Winamp" wiring - Keypad
997
The optional backlight wiring should be connected to nSEL, pin 17.
998
---------------------------------------------------------------------------
1002
This is originally based on "lcdtime" (by Benjamin Tse <blt@ComPorts.com>)
1003
and allows you to combine the LCD with a LED bargraph. The LCD is driven by
1004
LCDproc and the LEDs by another program such as portato. Further details
1005
can be obtained from:
1007
http://metalab.unc.edu/pub/linux/system/status/lcdtime-0.2.tar.gz http://
1008
metalab.unc.edu/pub/linux/system/status/meter-0.2.tar.gz http://
1009
metalab.unc.edu/pub/linux/system/status/portato-1.2.tar.gz
1011
Note Theoretically this wiring sends the data over twice as slow as the
1012
winamp or ext8bit wirings, because it only sends 4 bits at a time.
1014
The LCD connections are:
1028
nLF (14) RW (5) (LCD2 - 6) (optional - pull all LCD RW low)
1032
Figure 10. HD44780: "lcdtime" wiring
1034
See the lcdtime tar-ball (above) for full details of the bargraph
1037
The optional keypad can be connected as follows:
18
1039
printer port keypad
1059
Figure 11. HD44780: "lcdtime" wiring - keypad
1061
The backlight wiring should be attached to nSEL, pin 17. Because the
1062
portato program (mentioned above) also uses this pin to control the
1063
bargraph, you cannot use the backlight control together with the bargraph.
1064
---------------------------------------------------------------------------
1068
This interface uses a handful of wires to interface to the HD44780.
1069
Suitable for high noise, long connections. Designed by Andrew McMeikan <
1070
andrewm@engineer.com>. The original wiring and driver can be found at:
1072
http://members.xoom.com/andrewmuck
1074
I (Joris) have extended this driver and the wiring a bit. It now supports
1075
keys again (it had earlier supported keys, but some time did not).
1077
Further I have extended the driver and the wiring to be able to run using 2
1078
instead of 3 output pins. That's even one less pin ! :)
1080
Of course the use of fewer lines than the other wirings can not stay
1081
without drawbacks. In this case the simplicity of the long feeding wires is
1082
compensated by some intelligence in the decoding of the data. If you have
1083
no experience with the soldering iron, I do not recommend to build this
1086
OK, so here is the wiring. First of the 'simple' 3 wires version. IC1 is
1087
the shift register, a 4094. Do not forget to connect the 5V to pin 16 and
1088
GND to pin 8 of the IC.
1093
5V | shift reg | display
1096
+----|STR Q0|---------------------o 7 D0
1098
Data | 2| Q1|---------------------o 8 D1
1099
D3 5 o---------------------------|D |5 /Y1
1100
| | Q2|---------------------o 9 D2
1102
D4 6 o---------------------------| Q3|---------------------o 10 D3
1104
| 15| Q4|---------------------o Y4
1106
| Q5|---------------------o 4 RS
1108
| Q6|---------------------o Y6
1110
| Q7|---------------------o Y7
1119
D2 4 o-------------------------------------------------------------o 6 EN
1121
D7 9 o-------------------------------------------------------------o 6 EN2
1125
5V O-----+--------+----------------------------------+-----o 2 VCC
1129
--- IC1 | |<---o 3 Vlcd
1133
18..25 o-----------+--------+--------------------------+-------+-----o 1 GND
1138
Figure 12. HD44780: Serial LPT wiring ('simple')
1140
The second possible wiring is with 2 output lines. This one is a bit more
1141
complex. If you do not understand the schematic, do not build it.
1146
| shift reg | display
1149
D3 5 o-----------------------+---|D Q0|---------------------o 7 D0
1151
| 2| Q1|---------------------o 8 D1
1153
| Q2|---------------------o 9 D2
1155
| Q3|---------------------o 10 D3
1157
Clock 8| Q4|---------------------o Y4
1158
D4 6 o---------------------------|CK |11
1159
| Q5|---------------------o 4 RS
1160
___ 9|\ 8 9|_ |12 /Y5
1161
+--|___|--+----| >o----|R Q6|---------------------o Y6
1163
| --- IC1 | Q7|---+ +--o 5 RW
1165
| |100p ----------- | O ===
1169
+--------------------------------------+ | |
1171
| ___ 11|\ 10 | 5|\ 6
1172
+--|___|--+----| >o-------------------||----+-----| >o---o 6 EN
1177
| IC1=74HCT14 (6x Schmitt trigger inverter)
1181
5V O--+-------+------+------+------------------------+-----o 2 VCC
1184
|100n O 14 O 14 |/ .-.
1185
--- IC1 IC2 | |<---o 3 Vlcd
1186
--- O 7 O 7 1|\ 2 3|\ 4 | |10k
1187
| | | +--| >o- +--| >o- '-'
1188
GND | | | | |/ | |/ |
1189
18..25 o--------+-------+------+-------+----------+-----+------+-----o 1 GND
1194
Figure 13. HD44780: Serial LPT wiring ('complex')
1195
---------------------------------------------------------------------------
1200
Note To understand this part of the serialLpt documentation, you also need
1201
to read the keypad section in this document.
1203
serialLpt wiring supports a keypad. The 3 wires version supports 8 keys, or
1204
if you use multiple return lines up to 8 x 5 = 40 lines. The 2 wires
1205
version supports 7 keys, or with multiple return lines 7 x 5 = 35 keys.
1214
Figure 14. HD44780: Serial LPT - Keypad return lines
1216
On lines longer than, say a meter, you should buffer the return line(s). If
1217
you only have 1 return line, you can buffer it with two remaining buffers
26
1220
1|\ 2 13|\ 12 ___
1221
keypad o-----| >o------| >o---|___|---+---o input pin on LPT port
1229
Figure 15. HD44780: Serial LPT - Keypad return lines buffered
1230
---------------------------------------------------------------------------
1232
Serial LPT Backlight
1234
Also a backlight is suported. You will also need a port from the 74HCT14
1235
for that. The BL output below should be connected to the BL input in the
1239
Data o-----|___|--+----| >o----o BL output
1248
Figure 16. HD44780: Serial LPT - Backlight extra circuit
1249
---------------------------------------------------------------------------
1251
PIC-an-LCD serial device "picanlcd"
1253
The PIC-an-LCD module is also supported. It is not connected to the LPT
1254
port but to a serial port, which saves you from a lot of potential
1255
problems. To use it, specify the device to which you have connected the
1256
module in the config file with the Device= setting. The default is /dev/
1257
lcd. It does not support a keypad nor backlight switching.
1258
---------------------------------------------------------------------------
1262
Make sure that the HD44780 files are built when you run configure. This can
1263
be done by specifying "--enable-drivers=all" or by "--enable-drivers=
1265
---------------------------------------------------------------------------
1269
Modify the LCDd.conf file before you run LCDd. In this config file are
1270
detailed instructions on how to configure the HD44780 driver.
1272
Then as usual, start LCDd with the correct config file:
1274
E.g. LCDd -c ./LCDd.conf
1276
If you want to override the driver selection in LCDd.conf then use:
1278
LCDd -c ./LCDd.conf -d HD44780
1280
If you use this, the HD44780 driver will read the options from the config
1282
---------------------------------------------------------------------------
1286
This text has originally been taken from a message by Bill Farrow <
1287
bfarrow@arrow.bsee.swin.edu.au>.
1289
Updated February 2000, Benjamin Tse <blt@ComPorts.com>
1291
Updated October 2001, Joris Robijn <joris@robijn.net>
1293
Converted to docbook March 2002, Rene Wagner <reenoo@gmx.de>
1294
---------------------------------------------------------------------------
1296
The Matrix Orbital Driver (MtxOrb)
1298
This section covers the installation process for the Matrix Orbital LCD
1299
module intended for use with LCDproc.
1301
We will examine the installation process of the hardware in small steps, as
1302
it is vitally important to pay close attention to detail during hardware
1303
installation to avoid damaging equipment.
1304
---------------------------------------------------------------------------
1306
Matrix Orbital LCD Modules
1308
LCDproc was born out of original tinkering by William Ferrell with one of
1309
these LCD modules. Their ease of installation and use (as well as the
1310
amazing amount of patience demonstrated by the folks at Matrix Orbital
1311
whilst William figured things out) meant one less thing to worry about
1312
during the early stages of LCDproc's life.
1314
These 20x4 alphanumeric modules are connected via standard DB-9 cabling and
1315
connectors. They draw either 5V or 12V, depending on the module purchased,
1316
and are attached with a standard floppy cable connector (with a slightly
1317
modified wire configuration).
1319
Once connected, using them is a breeze. They can operate at any number of
1320
different baud rates and serial configurations, but normally they run at
1321
19,200 baud, 8-N-1, making them quite quick. Sending ASCII to the module
1322
will make it simply display that text at its current cursor position. The
1323
module has a built-in BIOS that recognizes commands (sent by transmitting a
1324
single-byte "marker" signifying that a command is on the way, followed by
1325
the single-byte command character itself along with any parameters, if
1326
needed) allowing the programmer to clear the screen, position the cursor
1327
anywhere, define custom characters (up to 8 at a time), draw bar graphs and
1328
large numbers, change the LCD's contrast, and so on.
1330
The BIOS included also implements line-wrapping (i.e. writing past the
1331
twentieth character on the first row will automatically move the cursor to
1332
the first character on the second row), and screen scrolling (i.e. writing
1333
past the twentieth character on the fourth row causes the whole screen to
1334
scroll up one row, clearing the fourth line and positioning the cursor at
1335
the first character on that line).
1337
These modules are fast. Using the auto-line-wrap feature and disabling the
1338
auto-scrolling feature, the screen can be updated thirty times per second
1339
if *every* character on the screen is changed. If updating less than the
1340
whole screen, the LCD can update faster than can be seen by the human eye.
1341
This, of course, more than meets LCDproc's needs.
1342
---------------------------------------------------------------------------
1344
Matrix Orbital Hardware Installation
1346
Regardless of what specific type of hardware you intend to use with
1347
LCDproc, installation is usually straightforward, and requires only a few
1348
steps. Regardless, you must use caution while working inside your computer
1349
system or with any hardware attachments.
1351
Warning Installing new hardware inside a computer system can be dangerous
1352
to both system components and the installer. Use caution whenever
1353
adding a component to the inside of your system, altering a power
1354
cable, or physically mounting a device inside a computer system.
1356
When installing hardware inside a computer, make sure it's turned
1357
off and that its power is disconnected. This is especially
1358
important when making changes to power cables (as some LCD modules
1360
---------------------------------------------------------------------------
1362
Matrix Orbital LCD/VFD Module Installation
1364
The LCD and VFD modules from Matrix Orbital are relatively straightforward
1365
to install. With a small, regular (flat-head) screwdriver, a spare floppy
1366
drive power cable, and a bit of luck, installation will take less than an
1369
These installation instructions assume that you are installing the module
1370
into a PC or PC-style system (one with AT- or ATX-compliant power cabling)
1371
and that you have some idea of where you intend to permanently mount the
1372
module. For mounting ideas and tips, refer to the section "Mounting" below.
1374
Tip Before you start
1375
Your Matrix Orbital LCD or VFD module should be clearly marked with an
1376
indication of the module's power requirements. It should be either a 5
1377
volt or 12 volt unit. You should have this information available before
1379
---------------------------------------------------------------------------
1381
Power Cable Modification
1383
The first step in installing the module is making the necessary
1384
modifications to a floppy drive power cable in order to provide power to
1385
the module. The modifications must be made based on the module's power
1386
requirements -- either 5V or 12V -- depending on which module you
1389
A standard floppy drive power cable has a smaller connection than a
1390
"normal" PC power connector. However, like a "normal" power connector, it
1391
has four wires: one yellow, one red, and two black. The red wire provides
1392
+5V power, and is "hot" or live when the system is powered up. The yellow
1393
wire provides +12V power, and is also hot when the system is powered up.
1394
Both black wires are ground. [TODO: INCLUDE A FIGURE HERE SHOWING A
1395
"STANDARD" FLOPPY CONNECTOR]
1397
One of the hot wires and one of the black wires will not be needed for your
1398
module's power connection; they will be completely removed when the power
1399
cable modification is complete.
1401
Warning Do NOT make this modification to a power cable attached to a
1402
running system! Electrocution resulting in personal injury and/or
1403
damage to the system can result.
1405
Using a regular screwdriver, press down the small metal locking flap of one
1406
of the two black wires on the small end of the cable, and pull the black
1407
wire from the connector. Using a pair of needle-nose pliers, squeeze the
1408
other end of the same black wire, and pull it out of the large end of the
1409
cable. This black wire can be set aside; it will not be used for the
1410
module's power connection. Either wire can be safely removed; you may
1411
safely remove either wire. [TODO: INCLUDE A FIGURE HERE SHOWING THIS
1414
Next, using the same procedure, remove the unneeded hot wire. If your
1415
module is 5V, you do not need the yellow (+12V) wire. Conversely, if your
1416
module is 12V, you do not need the red (+5V) wire. The removed wire can be
1417
set aside; it will not be used for the module's power connection. [TODO:
1418
INCLUDE A FIGURE HERE]
1420
The floppy power connector should now have only two wires attached to it.
1421
Leave the larger end alone from now on; these connections are correct (the
1422
larger end connects to your system's power mains). Move the two remaining
1423
wires to the outside connectors on the small end of the cable. Orientation
1424
does not particularly matter here; the connector will fit on the module's
1425
receptacle in either orientation. [TODO: A FIGURE HERE]
1427
You should now have a properly modified power connector. When physically
1428
attaching this connector to the module, the black (ground) lead should be
1429
connected to the pin labelled GND, while the colored (+5V/+12V) lead should
1430
be connected to the pin labelled +5V/+12V.
1432
Test the power connection before connecting the data line or mounting the
1433
module. Connect the module to the power connector, and the connector to
1434
your system's power mains. Turn the system on.
1436
Caution If the module does not immediately display its initial BIOS screen
1437
and light up its backlight (or light up the screen if a VFD module
1438
is being used), immediately power down the system, disconnect the
1439
module and connector, and double-check the modification before
1440
trying again. Do NOT leave the system on if the module does not
1441
immediately respond; module or system damage could result.
1443
When the LCD powers up and displays its initial BIOS screen, you've gotten
1444
the power connection wired properly and can now properly mount the module
1445
and make its final connections. Matrix Orbital Corporation sells a PC bay
1446
insert mount for the 20x4 and 20x2 modules (LCDproc, however, only supports
1447
the 20x4 at present). The inserts provide an easy means of mounting the LCD
1448
modules inside a PC using one (for the 20x2) or two (for the 20x4) 5 1/4"
1451
Note Describing how to physically mount the module in a PC case is beyond
1452
the scope of this document; LCDproc's website contains more detailed
1453
mounting information and examples.
1454
---------------------------------------------------------------------------
1458
The LCD module uses a standard DB9 serial connector. You can attach the
1459
module to your system using a direct cable to the motherboard, or by
1460
removing one of your system's serial ports from the back of the case, then
1461
connecting it to a standard serial cable to the module.
1463
While connecting the serial cable to the module, be sure to configure the
1464
module's serial interface settings. Typically, setting the module to its
1465
fastest setting (19,200 baud, 8-N-1) is recommended. The speed settings can
1466
be configured from the config file /etc/LCDd.conf. If not specified in the
1467
config file, the Matrix Orbital module driver in LCDproc default to use
1469
---------------------------------------------------------------------------
1473
This section was originally part of the lcdproc.sgml file by William W.
1474
Ferrell <wwf@splatwerks.org>
1476
Slightly modified in order to include it in this document March 2002, Rene
1477
Wagner <reenoo@gmx.de>
1478
---------------------------------------------------------------------------
1484
If you have installed the init-scripts you can simply start, stop and
1485
restart LCDd with the init-script.
1486
---------------------------------------------------------------------------
1488
Running LCDd from the command line
1490
There are several reasons for running LCDd from the command line
1492
* You don't want to install LCDd but run it from the source directory.
1494
* You want to do some debugging.
1496
* You want to get the output directly on stderr.
1502
Note If you run LCDd as a "normal" user, it will not change to the user
1503
specified in the config file. For parallel port devices you will need
1504
root privileges anyway ;)
1506
The simplest command that will run LCDd is the following. It is useful for
1507
running LCDd from the source directory, e.g. after building.
1508
$ server/LCDd -c LCDd.conf
1509
---------------------------------------------------------------------------
1511
The Command Line Options of LCDd
1513
Running LCDd -h gives you an overview of the currently available command
1514
line options, including a list of the compiled in drivers.
1519
LCDd Server Daemon (part of lcdproc), 0.4.3dev
1520
Copyright (c) 1999 Scott Scriven, William Ferrell, and misc contributors
1521
This program is freely redistributable under the terms of the GNU Public License
1522
Usage: LCDd [ -hfiws ] [ -c <config> ] [ -d <driver> ] [ -a <addr> ] \
1523
[ -p <port> ] [ -u <user> ] [ -w <time> ] [ -r <level> ]
1525
Available options are:
1526
-h Display this help screen
1527
-c <config> Use a configuration file other than /etc/LCDd.conf
1528
-d <driver> Add a driver to use (output only to first)
1529
-f Run in the foreground
1530
-i Disable showing of the main LCDproc server screen
1531
-w <waittime> Time to pause at each screen (in seconds)
1532
-a <addr> Network (IP) address to bind to
1533
-p <port> Network port to listen for connections on
1534
-u <user> User to run as
1535
-s Output messages to syslog
1536
-r <level> Report level (default=2)
1538
Currently available drivers:
1539
lcdm001, LCDM001, MtxOrb, MatrixOrbital, CFontz, CrystalFontz, LB216, text,
1540
curses, ncurses, BayRAD, glk, glc
1543
---------------------------------------------------------------------------
1547
You will probably more often run lcdproc from the command line than you
1549
---------------------------------------------------------------------------
1551
The Command Line Options of lcdproc
1553
Running lcdproc -h gives you an overview of the currently available command
1557
Example 2. lcdproc -h
1561
Usage: lcdproc [-s server] [-p port] [modelist]
1562
Options in []'s are optional.
1563
modelist is "mode [mode mode ...]"
1564
Mode letters: [C]pu [G]raph [T]ime [M]emory [X]load [D]isk [B]attery
1565
proc_[S]izes [O]ld_time big_cloc[K] [U]ptime CPU_SM[P]
1568
Use "man lcdproc" for more info.
1570
lcdproc -s my.lcdproc.server.com C M X -p 13666
1573
Note You will not be able to connect to a remote server, unless it listens
1574
to the correct interface and port! See LCDd.conf: The [server] Section
1575
for details on the server setup.
1576
---------------------------------------------------------------------------
1582
Of course LCDproc is not perfect (yet). We do our very best to improve it,
1583
but in some cases we are very much restricted in our efforts.
1585
The main reason for that is the fact that we do NOT have all the hardware
1586
people have writte. drivers for. Unfortunately some developers have kind of
1587
vanished and don't react to mails from the mailing list any more.
1589
So, as far as drivers are concerned we rely on YOU as testers. We have
1590
developed elaborate "coding in the dark" skills over the time. E.g. the
1591
CFontz driver has been updated and ported to 0.4.3 without the developers
1592
having the hardware.
1593
---------------------------------------------------------------------------
1595
The LCDproc Mailing List
1597
We are a bit lazy about the bug-tracking and whatever stuff on SourceForge.
1598
So, please contact us directly through the mailing list.
1600
For details on how to subscribe to the list see http://
1601
lcdproc.omnipotent.net/mail.php3.
1603
We like people to subscribe to the list with their real names. Of course we
1604
cannot and do not want to force you to do so. Anyway, we need to know your
1605
name, if you want to contribute code to LCDproc (legal issues of
1607
---------------------------------------------------------------------------
1611
Possibly you will find a bug in the LCDproc distribution. Before reporting
1612
this to the mailing list, please respect the following:
1614
* Your system should be more or less up to date. This does not mean that
1615
you have to update from GNU/Linux kernel 2.0.x to 2.2.x or from 2.2.x
1616
to 2.4.x. But we would like to make sure that your problem is not
1617
related to a known bug in the kernel or maybe your compiler.
1619
* Especially LCDd might need certain privileges to execute a command.
1620
Make sure LCDd HAS the rights to do so.
1622
* When experiencing problems with LCDd, make sure that your hardware is
1623
OK. E.g. you should make sure that the wireing for your (in this case
1624
most likely parallel) device is correct.
1626
* Make sure that you use the correct speed settings for your device.
1627
Incorrect speed settings (baud rate) are most likely to produce garbage
1628
scrolling on your display. Refer to the specifications of your device.
1629
If your device needs a speed setting that is not supported by LCDd send
1632
* Make sure that you have modified the configuration file according to
1633
your needs and that LCDd actually uses the configuration file. I.e. you
1634
might have to run LCDd with the -c option
1637
Anyway, no question is too stupid to ask ;) Feel free to ask whatever you
1638
want. Unfortunately replying to mails takes time as well (a damn lot of
1639
time). So, if you want LCDproc to develop faster, please try to solve a
1640
problem yourself first.
1642
BUT if you have actually FOUND A BUG we will be quite happy if you let us
1643
know. We NEED YOU as testers and appreciate any feedback.