~benklop/+junk/lcdproc

« back to all changes in this revision

Viewing changes to docs/lcdproc-user.txt

  • Committer: Bazaar Package Importer
  • Author(s): Noel Koethe
  • Date: 2002-04-18 18:05:00 UTC
  • Revision ID: james.westby@ubuntu.com-20020418180500-94iz2toqhzm3zvna
Tags: 0.4.3-10
* updated code from cvs to get all drivers updated.
  upstream maintainer asked for this for woody release
  this version will the 0.4.3 upstream release
* small changes in description
* added some upstream Docs which are not in the source

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
 
 
3
LCDproc User's Guide
 
4
 
 
5
The Ultimate Guide to LCDproc 0.4.3
 
6
 
 
7
Rene Wagner
 
8
 
 
9
 
 
10
reenoo@gmx.de
 
11
 
 
12
Copyright � 2002 by Rene Wagner
 
13
 
 
14
 
 
15
 
 
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
 
21
License".
 
22
 
 
23
0.0.1
 
24
---------------------------------------------------------------------------
 
25
 
 
26
Table of Contents
 
27
Introduction
 
28
   
 
29
    About this Document
 
30
    What is LCDproc?
 
31
    The LCDproc Server - LCDd
 
32
    The LCDproc "Main" Client - lcdproc
 
33
    Other LCDproc Clients
 
34
   
 
35
How to Obtain LCDproc
 
36
   
 
37
    Versioning
 
38
    Download Last Day's CVS Version of LCDproc as a Tarball
 
39
    Download The Latest Version of LCDproc from CVS
 
40
    apt-get
 
41
   
 
42
Installation
 
43
   
 
44
    Build LCDproc
 
45
    Install LCDproc Directly From The Sources
 
46
    Generate And Install Packages of LCDproc
 
47
   
 
48
LCDproc Configuration
 
49
   
 
50
    Configure LCDd
 
51
       
 
52
        LCDd.conf: The [server] Section
 
53
        LCDd.conf: The Drivers Section
 
54
       
 
55
    The LCDproc Init Scripts
 
56
       
 
57
        init-LCDd
 
58
        init-lcdproc
 
59
       
 
60
   
 
61
LCDproc Drivers
 
62
   
 
63
    The HD44780 Driver
 
64
       
 
65
        Connections
 
66
        Compiling
 
67
        Running
 
68
        Miscellania
 
69
       
 
70
    The Matrix Orbital Driver (MtxOrb)
 
71
       
 
72
        Matrix Orbital LCD Modules
 
73
        Matrix Orbital Hardware Installation
 
74
        Copyright
 
75
       
 
76
   
 
77
Running LCDproc
 
78
   
 
79
    Running LCDd
 
80
       
 
81
        Running LCDd from the command line
 
82
        The Command Line Options of LCDd
 
83
       
 
84
    Running lcdproc
 
85
       
 
86
        The Command Line Options of lcdproc
 
87
       
 
88
   
 
89
Contact Us
 
90
   
 
91
    Errata
 
92
    The LCDproc Mailing List
 
93
    Reporting Bugs
 
94
   
 
95
 
 
96
---------------------------------------------------------------------------
 
97
 
 
98
Introduction
 
99
 
 
100
About this Document
 
101
 
 
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
 
105
LCDproc'ed system.
 
106
 
 
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   
 
112
     the list.                                                             
 
113
 
 
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
 
118
Orbital displays.
 
119
 
 
120
William's document was "recycled" for the description of the Matrix Orbital
 
121
display driver and for other parts of this document.
 
122
---------------------------------------------------------------------------
 
123
 
 
124
What is LCDproc?
 
125
 
 
126
LCDproc is a client/server suite including drivers for all kinds of nifty
 
127
LCD displays.
 
128
 
 
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.
 
131
 
 
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.
 
136
 
 
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
 
141
joysticks.
 
142
 
 
143
Clients can connect to LCDd through common sockets.
 
144
 
 
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
---------------------------------------------------------------------------
 
149
 
 
150
The LCDproc Server - LCDd
 
151
 
 
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 ;)
 
154
 
 
155
LCDd can either be run from the command line or automatically by the init
 
156
scripts shipped with the distribution.
 
157
 
 
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
---------------------------------------------------------------------------
 
163
 
 
164
The LCDproc "Main" Client - lcdproc
 
165
 
 
166
While LCDd only offer the functionality of displaying text on a display,
 
167
lcdproc actually retrieves data worth displaying.
 
168
 
 
169
lcdproc gets its information from the /proc filesystem.
 
170
 
 
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
---------------------------------------------------------------------------
 
178
 
 
179
Other LCDproc Clients
 
180
 
 
181
As it is rather simple to write an LCDproc client, you can find various
 
182
clients on the Internet.
 
183
 
 
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
---------------------------------------------------------------------------
 
187
 
 
188
How to Obtain LCDproc
 
189
 
 
190
Versioning
 
191
 
 
192
At the time of writing there were four versions of LCDproc floating around
 
193
on the Internet.
 
194
 
 
195
LCDproc 0.4.1
 
196
    LCDproc 0.4.1 was the last "stable" release of LCDproc. It still uses
 
197
    the old command line configuration.
 
198
   
 
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!                              
 
204
   
 
205
LCDproc 0.4.2
 
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.
 
208
   
 
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.                            
 
213
   
 
214
LCDproc 0.4.3
 
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.
 
221
   
 
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   
 
228
         tested by YOU.                                                    
 
229
   
 
230
LCDproc 0.5
 
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.
 
234
   
 
235
    Warning From time to time LCDproc 0.5 might not even compile due to    
 
236
            drastic changes. You have been warned!                         
 
237
                                                                           
 
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
 
240
            yet ;)                                                         
 
241
   
 
242
 
 
243
---------------------------------------------------------------------------
 
244
 
 
245
Download Last Day's CVS Version of LCDproc as a Tarball
 
246
 
 
247
There are nightly distributions of the CVS branches of LCDproc. You can
 
248
download them from http://lcdproc.sourceforge.net/nightly/
 
249
 
 
250
To extract the files run either
 
251
$ tar xvfz lcdproc-CVS-*.tar.gz
 
252
 
 
253
or
 
254
$ bunzip2 -c lcdproc-CVS-*.tar.bz2 | tar xv
 
255
---------------------------------------------------------------------------
 
256
 
 
257
Download The Latest Version of LCDproc from CVS
 
258
 
 
259
Of course you can download the latest stuff from CVS via anonymous login.
 
260
 
 
261
Create a "cvs" directory somewhere on your machine (not really neccessary
 
262
but useful):
 
263
$ mkdir ~/cvs 
 
264
$ cd ~/cvs    
 
265
 
 
266
Login to CVS:
 
267
$ cvs -d:pserver:anonymous@cvs.lcdproc.sourceforge.net:/cvsroot/lcdproc login
 
268
 
 
269
(Hit enter when prompted for a password.)
 
270
 
 
271
Get the files from CVS:
 
272
$ cvs -d:pserver:anonymous@cvs.lcdproc.sourceforge.net:/cvsroot/lcdproc checkout -r stable-0-4-3 lcdproc
 
273
 
 
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
 
276
to CVS first.):
 
277
$ cvs -d:pserver:anonymous@cvs.lcdproc.sourceforge.net:/cvsroot/lcdproc update -r stable-0-4-3 lcdproc
 
278
 
 
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
 
281
machine:
 
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
---------------------------------------------------------------------------
 
286
 
 
287
apt-get
 
288
 
 
289
Debian GNU/Linux users can get the debian package of LCDproc, which is in
 
290
the unstable and testing distributions.
 
291
 
 
292
Provided apt-get is configured properly. You should be able to install the
 
293
package running:
 
294
$ su                     
 
295
Password: top secret     
 
296
# apt-get install lcdproc
 
297
---------------------------------------------------------------------------
 
298
 
 
299
Installation
 
300
 
 
301
Build LCDproc
 
302
 
 
303
Now that you have downloaded the LCDproc distribution you can start
 
304
building it.
 
305
 
 
306
Note If you have installed the debian package with apt-get (or another     
 
307
     debian tool), you can skip this this chapter.                         
 
308
 
 
309
If you're building this version from CVS, you'll need autoconf, automake,
 
310
aclocal & autoheader installed.
 
311
 
 
312
If you have autoconf and friends, run:
 
313
$ sh autogen.sh
 
314
 
 
315
This produces the configure script and supporting files. It has allready
 
316
been run if you using the tarball distribution.
 
317
 
 
318
Once the above command has run, the rest is pretty standard:
 
319
$ ./configure --help
 
320
 
 
321
Read about the options, figure out what to use.
 
322
$ ./configure --prefix=/usr/local --enable-drivers=ncurses,cfontz
 
323
 
 
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.
 
326
$ make
 
327
 
 
328
Congratulations: You have just compiled your version of LCDproc ;)
 
329
---------------------------------------------------------------------------
 
330
 
 
331
Install LCDproc Directly From The Sources
 
332
 
 
333
If you want to install LCDproc more or less permanently you can run:
 
334
$ su                 
 
335
Password: top secret 
 
336
# make install       
 
337
 
 
338
Note make install is absolutely OPTIONAL You can also run LCDproc directly 
 
339
     from the source directory. See below for details.                     
 
340
---------------------------------------------------------------------------
 
341
 
 
342
Generate And Install Packages of LCDproc
 
343
 
 
344
As an alternative (which is actually better ;) to installing directly from
 
345
the sources you can generate packages using the packaging tool EPM.
 
346
 
 
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
 
349
source distribution.
 
350
 
 
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.       
 
357
 
 
358
To generate an LCDproc package follow these instructions:
 
359
 
 
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
 
364
 
 
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       
 
369
     instructions.                                                         
 
370
 
 
371
A workaround for the described problem is creating a file named ~
 
372
/.rpmmacros which contains:
 
373
%_topdir ~/rpm
 
374
 
 
375
Important ~/rpm must contain the same tree usually found under /usr/src/RPM
 
376
 
 
377
Unfortunately epm does not read ~/.rpmmacros and of course returns
 
378
warnings. Don't worry! That's OK ;)
 
379
 
 
380
In order to actually install the generated package follow the instructions
 
381
in your system's manual.
 
382
---------------------------------------------------------------------------
 
383
 
 
384
LCDproc Configuration
 
385
 
 
386
Configure LCDd
 
387
 
 
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
 
390
/etc/LCDd.conf.
 
391
 
 
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       
 
395
     package.                                                              
 
396
 
 
397
The format of the /etc/LCDd.conf is ini-file-like.
 
398
 
 
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
 
401
';'.
 
402
 
 
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
 
405
[drivername].
 
406
 
 
407
The drivers are activated by specifiying them in a driver= line in the
 
408
server section, like:
 
409
 
 
410
 
 
411
Example 1. LCDd.conf: Specify which driver to use
 
412
 
 
 
b'Driver=curses'
 
413
 
 
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.
 
418
 
 
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     
 
421
        doing here.                                                        
 
422
 
 
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:
 
427
 
 
428
 
 
429
Example 2. LCDd.conf: Compatibility mode for drivers written for 0.4.1
 
430
 
 
 
b'Arguments="place arguments here"'
 
431
 
 
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
 
435
 
 
436
LCDd -d driver "driverargs"
 
437
 
 
438
Note The -d option still works, but does not allow driverargs any more.    
 
439
                                                                           
 
440
     If -d is specified on the command line, the Driver= options in the    
 
441
     config file are ignored.                                              
 
442
---------------------------------------------------------------------------
 
443
 
 
444
LCDd.conf: The [server] Section
 
445
 
 
446
The [server] section of the LCDd.conf contains the settings for the LCDproc
 
447
server LCDd.
 
448
 
 
449
Driver=
 
450
    Tells the server which driver(s) to use. See above for details
 
451
   
 
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.                                            
 
455
   
 
456
Bind=
 
457
    Tells the server to bind to the given interface. Default to Bind=
 
458
    127.0.0.1 which is actually the safest variant.
 
459
   
 
460
Port=
 
461
    Tells the server to listen to this specified port; defaults to 13666.
 
462
   
 
463
ReportLevel=
 
464
    Sets the reporting level; defaults to 2 (warnings and errors only).
 
465
   
 
466
ReportToSyslog=
 
467
    Should we report to syslog instead of stderr ? Defaults to no.
 
468
   
 
469
WaitTime=
 
470
    Sets the default time in seconds to display a screen.
 
471
   
 
472
User=
 
473
    User to run as. LCDd will drop its root privileges, if any, and run as
 
474
    this user instead. Defaults to User=nobody.
 
475
   
 
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.                  
 
479
   
 
480
ServerScreen=
 
481
    Enables the server screen even when other screens are active. Defaults
 
482
    to no.
 
483
   
 
484
Foreground=
 
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.
 
487
   
 
488
 
 
489
---------------------------------------------------------------------------
 
490
 
 
491
LCDd.conf: The Drivers Section
 
492
 
 
493
As mentioned earlier, each driver has its own section in the LCDd.conf.
 
494
 
 
495
The settings are more or less self-explanatory. So, read through the
 
496
section of your driver and change everything neccessary.
 
497
---------------------------------------------------------------------------
 
498
 
 
499
The LCDproc Init Scripts
 
500
 
 
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
 
503
LCDproc sources.
 
504
 
 
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  
 
507
     your system.                                                          
 
508
 
 
509
Refer to your system's manual on how to install the scripts.
 
510
---------------------------------------------------------------------------
 
511
 
 
512
init-LCDd
 
513
 
 
514
The file scripts/init-LCDd.* is the init script for the LCDproc server
 
515
LCDd. It does not require modification.
 
516
---------------------------------------------------------------------------
 
517
 
 
518
init-lcdproc
 
519
 
 
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.
 
523
 
 
524
Note You can retrieve a listing of all options of lcdproc running lcdproc  
 
525
     --help.                                                               
 
526
 
 
527
 
 
528
Example 3. init-lcdproc.debian: Modify the option passed to lcdproc
 
529
(Debian)
 
530
 
 
 
b'start-stop-daemon --start --quiet --background --exec ${lcdproc} -- C'
 
531
 
 
532
In this example lcdproc will only send information on the CPU usage to the
 
533
server.
 
534
 
 
535
 
 
536
Example 4. init-lcdproc.rpm: Modify the option passed to lcdproc (RedHat)
 
537
 
 
 
b'daemon ${lcdproc} C X &'
 
538
 
 
539
In this example lcdproc will only send information on the CPU usage [C] and
 
540
system load [X] to the server.
 
541
---------------------------------------------------------------------------
 
542
 
 
543
LCDproc Drivers
 
544
 
 
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
---------------------------------------------------------------------------
 
549
 
 
550
The HD44780 Driver
 
551
 
 
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.
 
555
 
 
556
The LCDproc HD44780 driver supports the following connections on a parallel
 
557
port:
 
558
 
 
559
  * 4-bit
 
560
   
 
561
  * 8-bit (winamp style)
 
562
   
 
563
  * extended 8-bit (LCD + LED bargraph)
 
564
   
 
565
  * serial LPT
 
566
   
 
567
 
 
568
And supports a PIC-an-LCD connected to a serial port.
 
569
 
 
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
 
573
driver.
 
574
---------------------------------------------------------------------------
 
575
 
 
576
Connections
 
577
 
 
578
Common connections for all connectiontypes
 
579
 
 
580
No matter what connectiontype you choose, you will always need some
 
581
connections. They are explaned here.
 
582
---------------------------------------------------------------------------
 
583
 
 
584
Power
 
585
 
 
586
All variants use the same method of obtaining power. i.e., for each LCD:
 
587
 
 
588
 
 
589
Table 1. HD44780: Power Connections
 
590
+------------+------+-----------------------------------------------------+
 
591
|            |      |                                                     |
 
592
+------------+------+-----------------------------------------------------+
 
593
| LCD        | pin  | signal                                              |
 
594
+------------+------+-----------------------------------------------------+
 
595
|            |      |                                                     |
 
596
+------------+------+-----------------------------------------------------+
 
597
| 1          | GND  | (connect to any of pins 18 - 25 of you parallel     |
 
598
|            |      | port)                                               |
 
599
+------------+------+-----------------------------------------------------+
 
600
| 2          | +5V  |                                                     |
 
601
+------------+------+-----------------------------------------------------+
 
602
| 3          | Vadj | (contrast)                                          |
 
603
+------------+------+-----------------------------------------------------+
 
604
|            |      |                                                     |
 
605
+------------+------+-----------------------------------------------------+
 
606
 
 
607
Warning Always double check your power connection, your display will       
 
608
        probably NOT survive a reversely connected supply !                
 
609
 
 
610
There are several ways to get 5V:
 
611
 
 
612
  * Connect to a 5V line intented for disk drives (the red wire is 5V,
 
613
    black is GND).
 
614
   
 
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'
 
618
    5V.
 
619
   
 
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
 
623
    question...
 
624
   
 
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
 
627
    of 100mA or 200mA.
 
628
   
 
629
 
 
630
 
0
631
    (variable resistor) 
 
632
        .------.          
 
633
 Vcc ---|  10k |--- GND   
 
634
        `---^--'          
 
635
           /|\            
 
636
            |             
 
637
          Vadj.
1
638
         
 
639
 
 
640
Figure 1. HD44780: Connecting the contrast adjusting pin (Vadj.)
 
641
---------------------------------------------------------------------------
 
642
 
 
643
Keypad
 
644
 
 
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
 
647
to the input pins.
 
648
---------------------------------------------------------------------------
 
649
 
 
650
Direct Keys
 
651
 
 
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.
 
654
 
2
655
     O 5V                    
 
656
      |                        
 
657
      |                        
 
658
      -                        
 
659
     | | 10k                   
 
660
     | |                       
 
661
      -                        
 
662
      |                        
 
663
      +-----------o input  (X) 
 
664
      |                        
 
665
      |                        
 
666
      o                        
 
667
       \                       
 
668
      o                        
 
669
      |                        
 
670
      |                        
 
671
     === GND
3
672
                 
 
673
 
 
674
Figure 2. HD44780: Direct Keys
 
675
 
 
676
By default, the following keystrokes are generated by the different keys:
 
677
 
 
678
 
 
679
Table 2. HD44780: Default Keystrokes
 
680
+-------+-----+
 
681
|       |     |
 
682
+-------+-----+
 
683
| X0    | A   |
 
684
+-------+-----+
 
685
| X1    | B   |
 
686
+-------+-----+
 
687
| X2    | C   |
 
688
+-------+-----+
 
689
| X3    | D   |
 
690
+-------+-----+
 
691
|       |     |
 
692
+-------+-----+
 
693
---------------------------------------------------------------------------
 
694
 
 
695
Matrix Keys
 
696
 
 
697
Using a matrix, we can connect much more keys. To simplify the drawing
 
698
here, we replace all switches with an @ symbol:
 
699
 
4
700
            X line                     
 
701
                |                        
 
702
                |                        
 
703
  Y line ---+---------                   
 
704
            |   |                    |   
 
705
            o   |               =  --@-- 
 
706
             \  |                    |   
 
707
            o   |                        
 
708
            |   |                        
 
709
            +---+                        
 
710
                |                        
 
711
                |
5
712
                      
 
713
 
 
714
Figure 3. HD44780: Single Matrix Key
 
715
 
 
716
We connect the matrix of keys like this:
 
717
 
 
 
b'Y0 o---|<---@--@--@                               '
 
718
            |  |  |                                
 
719
Y1 o---|<---@--@--@                                
 
720
            |  |  |                                
 
721
Y2 o---|<---@--@--@                                
 
722
            |  |  |                                
 
723
Y3 o---|<---@--@--@            O 5V                
 
724
            |  |  |            |                   
 
725
    diodes  |  |  |     ___    |                   
 
726
    1N4148  +----------|___|---+                   
 
727
            |  |  |     ___    |                   
 
728
            |  +-------|___|---+                   
 
729
            |  |  |     ___    |                   
 
730
            |  |  +----|___|---+     resistors 22k 
 
731
            |  |  |                                
 
732
            o  o  o                                
 
733
            X0 X1 X2
6
734
                             
 
735
 
 
736
Figure 4. HD44780: Complete Key Matrix
 
737
 
 
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
 
741
assumes this:
 
742
 
7
743
     X0 X1 X2 X3 
 
744
                   
 
745
Y0    1  2  3  A   
 
746
Y1    4  5  6  B   
 
747
Y2    7  8  9  C   
 
748
Y3    *  0  #  D
8
749
 
 
750
 
 
751
Figure 5. HD44780: Keypad Layout
 
752
 
 
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.
 
756
 
 
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.
 
760
 
 
761
If you want to use just one return line, for example with the serialLpt
 
762
wiring, it looks (completely drawn) like this:
 
763
 
9
764
                 O 5V              
 
765
                  |                  
 
766
                 .-.                 
 
767
                 | | 4k7 or 22k      
 
768
     diodes      | |                 
 
769
     1N4148      '-'                 
 
770
            ___   |                  
 
771
Y0 o---|<---o o---+                  
 
772
            ___   |                  
 
773
Y1 o---|<---o o---+                  
 
774
            ___   |                  
 
775
Y2 o---|<---o o---+                  
 
776
            ___   |                  
 
777
Y3 o---|<---o o---+----o return line
 
778
 
 
779
Figure 6. HD44780: One Return Line
 
780
 
 
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 =
 
785
    5V.                                                                    
 
786
---------------------------------------------------------------------------
 
787
 
 
788
Backlight
 
789
 
 
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:
 
794
 
10
795
                                            O 5V                       
 
796
                                      ___    |                           
 
797
                                 +---|___|---+                           
 
798
LPT Sub-D connector              |   4k7     |                           
 
799
                                 |           |e                          
 
800
                          ___    |       b |/                            
 
801
     BL pin o------------|___|---+---------|                             
 
802
                          1k               |\                            
 
803
                                       bc327 |c                          
 
804
                                             |        LCD connector      
 
805
                                             |                           
 
806
                                             +--------o 15 backlight     
 
807
                                                                         
 
808
                                             +--------o 16 GND backlight 
 
809
                                             |                           
 
810
                                            === GND                      
 
811
                                                                         
 
812
Note: 4k7 means 4,7 kohm.                                                
 
813
The BC327 transistor has the following connections:                      
 
814
                                                                         
 
815
     _____                                                               
 
816
    |     |                                                              
 
817
    |bc327|                                                              
 
818
    |_____|                                                              
 
819
     | | |                                                               
 
820
     | | |                                                               
 
821
     | | |                                                               
 
822
     c b e
11
823
                                                             
 
824
 
 
825
Figure 7. HD44780: Backlight Wiring
 
826
 
 
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).                                       
 
832
 
 
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
---------------------------------------------------------------------------
 
838
 
 
839
4-bit
 
840
 
 
841
This is originally based on "lcdtext" (by Matthias Prinke).
 
842
 
 
843
 
 
844
Table 3. HD44780: 4-bit Pinouts (1)
 
845
+---------------------------+---------------------------------------------+
 
846
|                           |                                             |
 
847
+---------------------------+---------------------------------------------+
 
848
| printer port              | LCD                                         |
 
849
+---------------------------+---------------------------------------------+
 
850
|                           |                                             |
 
851
+---------------------------+---------------------------------------------+
 
852
| D0 (2)                    | D4 (11)                                     |
 
853
+---------------------------+---------------------------------------------+
 
854
| D1 (3)                    | D5 (12)                                     |
 
855
+---------------------------+---------------------------------------------+
 
856
| D2 (4)                    | D6 (13)                                     |
 
857
+---------------------------+---------------------------------------------+
 
858
| D3 (5)                    | D7 (14)                                     |
 
859
+---------------------------+---------------------------------------------+
 
860
| D4 (6)                    | RS (4)                                      |
 
861
+---------------------------+---------------------------------------------+
 
862
| D5 (7)                    | RW (5) (LCD3 - 6) (optional - pull all LCD  |
 
863
|                           | RW low)                                     |
 
864
+---------------------------+---------------------------------------------+
 
865
| D6 (8)                    | EN (6)                                      |
 
866
+---------------------------+---------------------------------------------+
 
867
| D7 (9)                    | EN2 (LCD2 - 6) (optional)                   |
 
868
+---------------------------+---------------------------------------------+
 
869
|                           |                                             |
 
870
+---------------------------+---------------------------------------------+
 
871
 
 
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:
 
875
 
 
876
 
 
877
Table 4. HD44780: 4-bit Pinouts (2)
 
878
+----------------+-------+
 
879
|                |       |
 
880
+----------------+-------+
 
881
| printer port   | LCD   |
 
882
+----------------+-------+
 
883
|                |       |
 
884
+----------------+-------+
 
885
| STR (1)        | EN4   |
 
886
+----------------+-------+
 
887
| LF (14)        | EN5   |
 
888
+----------------+-------+
 
889
| INIT (16)      | EN6   |
 
890
+----------------+-------+
 
891
| SEL (17)       | EN7   |
 
892
+----------------+-------+
 
893
|                |       |
 
894
+----------------+-------+
 
895
 
 
896
The optional keypad can be connected as follows:
 
897
 
 
898
 
 
899
Table 5. HD44780: 4-bit Keypad Pinouts
 
900
+-----------------+-------+
 
901
|                 |       |
 
902
+-----------------+-------+
 
903
| printer port    | LCD   |
 
904
+-----------------+-------+
 
905
|                 |       |
 
906
+-----------------+-------+
 
907
| D0 (2)          | Y0    |
 
908
+-----------------+-------+
 
909
| D1 (3)          | Y1    |
 
910
+-----------------+-------+
 
911
| D2 (4)          | Y2    |
 
912
+-----------------+-------+
 
913
| D3 (5)          | Y3    |
 
914
+-----------------+-------+
 
915
| D4 (6)          | Y4    |
 
916
+-----------------+-------+
 
917
| D5 (7)          | Y5    |
 
918
+-----------------+-------+
 
919
| nSTRB (1)       | Y6    |
 
920
+-----------------+-------+
 
921
| nLF (14)        | Y7    |
 
922
+-----------------+-------+
 
923
| INIT (16)       | Y8    |
 
924
+-----------------+-------+
 
925
| nSEL (17)       | Y9    |
 
926
+-----------------+-------+
 
927
|                 |       |
 
928
+-----------------+-------+
 
929
| nACK (10)       | X0    |
 
930
+-----------------+-------+
 
931
| BUSY (11)       | X1    |
 
932
+-----------------+-------+
 
933
| PAPEREND (12)   | X2    |
 
934
+-----------------+-------+
 
935
| SELIN (13)      | X3    |
 
936
+-----------------+-------+
 
937
| nFAULT (15)     | X4    |
 
938
+-----------------+-------+
 
939
|                 |       |
 
940
+-----------------+-------+
 
941
 
 
942
The optional backlight wiring should be connected to D5, pin 7.
 
943
---------------------------------------------------------------------------
 
944
 
 
945
8-bit "Winamp"
 
946
 
 
947
This type of connection should work with winamp.
 
948
 
12
949
 printer port  LCD                               
 
950
                                                   
 
951
  D0 (2)        D0 (7)                             
 
952
  D1 (3)        D1 (8)                             
 
953
  D2 (4)        D2 (9)                             
 
954
  D3 (5)        D3 (10)                            
 
955
  D4 (6)        D4 (11)                            
 
956
  D5 (7)        D5 (12)                            
 
957
  D6 (8)        D6 (13)                            
 
958
  D7 (9)        D7 (14)                            
 
959
  nSTRB (1)     EN (6)                             
 
960
  nLF   (14)    nRW (5) (EN3 6 - LCD 3) (optional) 
 
961
  INIT  (16)    RS (4)                             
 
962
  nSEL  (17)    EN2 (6 - LCD 2) (optional)
13
963
       
 
964
 
 
965
Figure 8. HD44780: "Winamp" wiring
 
966
 
 
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
 
971
to this line.
 
972
 
 
973
The optional keypad can be connected as follows:
 
974
 
14
975
 printer port  keypad 
 
976
                        
 
977
  D0 (2)        Y0      
 
978
  D1 (3)        Y1      
 
979
  D2 (4)        Y2      
 
980
  D3 (5)        Y3      
 
981
  D4 (6)        Y4      
 
982
  D5 (7)        Y5      
 
983
  D6 (8)        Y6      
 
984
  D7 (9)        Y7      
 
985
  nLF  (14)     Y8      
 
986
  INIT (16)     Y9      
 
987
                        
 
988
  nACK (10)     X0      
 
989
  BUSY (11)     X1      
 
990
  PAPEREND (12) X2      
 
991
  SELIN (13)    X3      
 
992
  nFAULT (15)   X4
15
993
    
 
994
 
 
995
Figure 9. HD44780: "Winamp" wiring - Keypad
 
996
 
 
997
The optional backlight wiring should be connected to nSEL, pin 17.
 
998
---------------------------------------------------------------------------
 
999
 
 
1000
8-bit "lcdtime"
 
1001
 
 
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:
 
1006
 
 
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
 
1010
 
 
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.    
 
1013
 
 
1014
The LCD connections are:
 
1015
 
16
1016
 printer port  LCD                                               
 
1017
                                                                   
 
1018
  D0 (2)        D0 (7)                                             
 
1019
  D1 (3)        D1 (8)                                             
 
1020
  D2 (4)        D2 (9)                                             
 
1021
  D3 (5)        D3 (10)                                            
 
1022
  D4 (6)        D4 (11)                                            
 
1023
  D5 (7)        D5 (12)                                            
 
1024
  D6 (8)        D6 (13)                                            
 
1025
  D7 (9)        D7 (14)                                            
 
1026
  nSEL  (17)    -                                                  
 
1027
  nSTRB (1)     RS (4)                                             
 
1028
  nLF   (14)    RW (5) (LCD2 - 6) (optional - pull all LCD RW low) 
 
1029
  INIT  (16)    EN (6)
17
1030
                                           
 
1031
 
 
1032
Figure 10. HD44780: "lcdtime" wiring
 
1033
 
 
1034
See the lcdtime tar-ball (above) for full details of the bargraph
 
1035
connections.
 
1036
 
 
1037
The optional keypad can be connected as follows:
 
1038
 
18
1039
 printer port  keypad 
 
1040
                        
 
1041
  D0 (2)        Y0      
 
1042
  D1 (3)        Y1      
 
1043
  D2 (4)        Y2      
 
1044
  D3 (5)        Y3      
 
1045
  D4 (6)        Y4      
 
1046
  D5 (7)        Y5      
 
1047
  D6 (8)        Y6      
 
1048
  D7 (9)        Y7      
 
1049
  nSTRB (1)     Y8      
 
1050
  nSEL (17)     Y9      
 
1051
                        
 
1052
  nACK (10)     X0      
 
1053
  BUSY (11)     X1      
 
1054
  PAPEREND (12) X2      
 
1055
  SELIN (13)    X3      
 
1056
  nFAULT (15)   X4
19
1057
    
 
1058
 
 
1059
Figure 11. HD44780: "lcdtime" wiring - keypad
 
1060
 
 
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
---------------------------------------------------------------------------
 
1065
 
 
1066
Serial LPT
 
1067
 
 
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:
 
1071
 
 
1072
http://members.xoom.com/andrewmuck
 
1073
 
 
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).
 
1076
 
 
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 ! :)
 
1079
 
 
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
 
1084
wiring.
 
1085
 
 
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.
 
1089
 
20
1090
                                       IC1                                    
 
1091
                                     -----------                                
 
1092
                                    |   4094    |                               
 
1093
                              5V    | shift reg |                     display   
 
1094
                               O    |           |                         /keys 
 
1095
                               |   1|           |3                              
 
1096
                               +----|STR      Q0|---------------------o 7  D0   
 
1097
                               |    |           |4                         /Y0  
 
1098
           Data                |   2|         Q1|---------------------o 8  D1   
 
1099
   D3 5 o---------------------------|D          |5                         /Y1  
 
1100
                               |    |         Q2|---------------------o 9  D2   
 
1101
                               |   3|CK         |6                         /Y2  
 
1102
   D4 6 o---------------------------|         Q3|---------------------o 10 D3   
 
1103
                               |    |           |10                        /Y3  
 
1104
                               |  15|         Q4|---------------------o    Y4   
 
1105
                               +----|OE         |11                             
 
1106
                                    |         Q5|---------------------o 4  RS   
 
1107
                                    |           |12                        /Y5  
 
1108
                                    |         Q6|---------------------o    Y6   
 
1109
                                    |           |13                             
 
1110
                                    |         Q7|---------------------o    Y7   
 
1111
                                    |           |9                              
 
1112
                                    |         QS|--                +--o 5  RW   
 
1113
                                    |         __|10                |            
 
1114
                                    |         QS|--               ===           
 
1115
                                    |           |                               
 
1116
                                     -----------                                
 
1117
                                                                                
 
1118
                                                                                
 
1119
   D2 4 o-------------------------------------------------------------o 6 EN    
 
1120
                                                                                
 
1121
   D7 9 o-------------------------------------------------------------o 6 EN2   
 
1122
                                                                     (2nd LCD)  
 
1123
                                                                                
 
1124
                                                                                
 
1125
          5V  O-----+--------+----------------------------------+-----o 2 VCC   
 
1126
                    |        |                                  |               
 
1127
                    |        |                                  |               
 
1128
                    |100n    O 16                              .-.              
 
1129
                   ---      IC1                                | |<---o 3 Vlcd  
 
1130
                   ---       O 8                               | |10k           
 
1131
                    |        |                                 '-'              
 
1132
   GND              |        |                                  |               
 
1133
 18..25 o-----------+--------+--------------------------+-------+-----o 1 GND   
 
1134
                                                        |                       
 
1135
                                                       === GND
21
1136
                
 
1137
 
 
1138
Figure 12. HD44780: Serial LPT wiring ('simple')
 
1139
 
 
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.
 
1142
 
22
1143
                                       IC2                                    
 
1144
                                     -----------                                
 
1145
                                    |  74HCT164 |                               
 
1146
                                    | shift reg |                     display   
 
1147
                                    |           |                         /keys 
 
1148
           Data                    1|           |3                              
 
1149
   D3 5 o-----------------------+---|D        Q0|---------------------o 7  D0   
 
1150
                                |   |           |4                         /Y0  
 
1151
                                |  2|         Q1|---------------------o 8  D1   
 
1152
                                +---|D          |5                         /Y1  
 
1153
                                    |         Q2|---------------------o 9  D2   
 
1154
                                    |           |6                         /Y2  
 
1155
                                    |         Q3|---------------------o 10 D3   
 
1156
                                    |           |10                        /Y3  
 
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   
 
1162
             |   22k   |    |/      |           |13                             
 
1163
             |        ---   IC1     |         Q7|---+              +--o 5  RW   
 
1164
             |        ---           |           |   |    5V        |            
 
1165
             |         |100p         -----------    |    O        ===           
 
1166
             |         |                            |    |                      
 
1167
             |        ===                           |   .-.                     
 
1168
             |                                      |   | |22k                  
 
1169
             +--------------------------------------+   | |                     
 
1170
             |                                          '-'                     
 
1171
             |   ___      11|\ 10                        |    5|\ 6             
 
1172
             +--|___|--+----| >o-------------------||----+-----| >o---o 6 EN    
 
1173
                 22k   |    |/                    22p          |/               
 
1174
                      ---   IC1                                IC1              
 
1175
                      ---                                                       
 
1176
                       |22p                                                     
 
1177
                       |            IC1=74HCT14 (6x Schmitt trigger inverter)   
 
1178
                      ===                                                       
 
1179
                                                                                
 
1180
                                                                                
 
1181
          5V  O--+-------+------+------+------------------------+-----o 2 VCC   
 
1182
                 |       |      |      | 13|\ 12                |               
 
1183
                 |       |      |      +---| >o-                |               
 
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   
 
1190
                                                         |                      
 
1191
                                                        === GND
23
1192
               
 
1193
 
 
1194
Figure 13. HD44780: Serial LPT wiring ('complex')
 
1195
---------------------------------------------------------------------------
 
1196
 
 
1197
Serial LPT Keypad
 
1198
 
 
1199
 
 
1200
Note To understand this part of the serialLpt documentation, you also need 
 
1201
     to read the keypad section in this document.                          
 
1202
 
 
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.
 
1206
 
24
1207
 nACK (10)     X0 
 
1208
  BUSY (11)     X1  
 
1209
  PAPEREND (12) X2  
 
1210
  SELIN (13)    X3  
 
1211
  nFAULT (15)   X4
25
1212
 
 
1213
 
 
1214
Figure 14. HD44780: Serial LPT - Keypad return lines
 
1215
 
 
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
 
1218
from the 74HCT14:
 
1219
 
26
1220
              1|\ 2    13|\ 12   ___                               
 
1221
   keypad o-----| >o------| >o---|___|---+---o input pin on LPT port 
 
1222
   return       |/        |/      220E   |                           
 
1223
                IC1       IC1           ---                          
 
1224
                                        --- 1nF                      
 
1225
                                         |                           
 
1226
                                        ===
27
1227
                        
 
1228
 
 
1229
Figure 15. HD44780: Serial LPT - Keypad return lines buffered
 
1230
---------------------------------------------------------------------------
 
1231
 
 
1232
Serial LPT Backlight
 
1233
 
 
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
 
1236
backlight section
 
1237
 
28
1238
                ___       3|\ 4               
 
1239
     Data o-----|___|--+----| >o----o BL output 
 
1240
   LPT-D3       470k   |    |/                  
 
1241
                      ---   IC1                 
 
1242
                      ---                       
 
1243
                       |100nF                   
 
1244
                       |                        
 
1245
                      ===
29
1246
                     
 
1247
 
 
1248
Figure 16. HD44780: Serial LPT - Backlight extra circuit
 
1249
---------------------------------------------------------------------------
 
1250
 
 
1251
PIC-an-LCD serial device "picanlcd"
 
1252
 
 
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
---------------------------------------------------------------------------
 
1259
 
 
1260
Compiling
 
1261
 
 
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=
 
1264
hd44780".
 
1265
---------------------------------------------------------------------------
 
1266
 
 
1267
Running
 
1268
 
 
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.
 
1271
 
 
1272
Then as usual, start LCDd with the correct config file:
 
1273
 
 
1274
E.g. LCDd -c ./LCDd.conf
 
1275
 
 
1276
If you want to override the driver selection in LCDd.conf then use:
 
1277
 
 
1278
LCDd -c ./LCDd.conf -d HD44780
 
1279
 
 
1280
If you use this, the HD44780 driver will read the options from the config
 
1281
file anyway.
 
1282
---------------------------------------------------------------------------
 
1283
 
 
1284
Miscellania
 
1285
 
 
1286
This text has originally been taken from a message by Bill Farrow <
 
1287
bfarrow@arrow.bsee.swin.edu.au>.
 
1288
 
 
1289
Updated February 2000, Benjamin Tse <blt@ComPorts.com>
 
1290
 
 
1291
Updated October 2001, Joris Robijn <joris@robijn.net>
 
1292
 
 
1293
Converted to docbook March 2002, Rene Wagner <reenoo@gmx.de>
 
1294
---------------------------------------------------------------------------
 
1295
 
 
1296
The Matrix Orbital Driver (MtxOrb)
 
1297
 
 
1298
This section covers the installation process for the Matrix Orbital LCD
 
1299
module intended for use with LCDproc.
 
1300
 
 
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
---------------------------------------------------------------------------
 
1305
 
 
1306
Matrix Orbital LCD Modules
 
1307
 
 
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.
 
1313
 
 
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).
 
1318
 
 
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.
 
1329
 
 
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).
 
1336
 
 
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
---------------------------------------------------------------------------
 
1343
 
 
1344
Matrix Orbital Hardware Installation
 
1345
 
 
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.
 
1350
 
 
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.   
 
1355
                                                                           
 
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 
 
1359
        require).                                                          
 
1360
---------------------------------------------------------------------------
 
1361
 
 
1362
Matrix Orbital LCD/VFD Module Installation
 
1363
 
 
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
 
1367
hour.
 
1368
 
 
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.
 
1373
 
 
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
 
1378
    proceeding.                                                            
 
1379
---------------------------------------------------------------------------
 
1380
 
 
1381
Power Cable Modification
 
1382
 
 
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
 
1387
purchased.
 
1388
 
 
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]
 
1396
 
 
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.
 
1400
 
 
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.                                   
 
1404
 
 
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
 
1412
PROCESS]
 
1413
 
 
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]
 
1419
 
 
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]
 
1426
 
 
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.
 
1431
 
 
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.
 
1435
 
 
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.         
 
1442
 
 
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"
 
1449
bays.
 
1450
 
 
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
---------------------------------------------------------------------------
 
1455
 
 
1456
Serial Connection
 
1457
 
 
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.
 
1462
 
 
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
 
1468
these settings.
 
1469
---------------------------------------------------------------------------
 
1470
 
 
1471
Copyright
 
1472
 
 
1473
This section was originally part of the lcdproc.sgml file by William W.
 
1474
Ferrell <wwf@splatwerks.org>
 
1475
 
 
1476
Slightly modified in order to include it in this document March 2002, Rene
 
1477
Wagner <reenoo@gmx.de>
 
1478
---------------------------------------------------------------------------
 
1479
 
 
1480
Running LCDproc
 
1481
 
 
1482
Running LCDd
 
1483
 
 
1484
If you have installed the init-scripts you can simply start, stop and
 
1485
restart LCDd with the init-script.
 
1486
---------------------------------------------------------------------------
 
1487
 
 
1488
Running LCDd from the command line
 
1489
 
 
1490
There are several reasons for running LCDd from the command line
 
1491
 
 
1492
  * You don't want to install LCDd but run it from the source directory.
 
1493
   
 
1494
  * You want to do some debugging.
 
1495
   
 
1496
  * You want to get the output directly on stderr.
 
1497
   
 
1498
  * ...
 
1499
   
 
1500
 
 
1501
 
 
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 ;)                                             
 
1505
 
 
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
---------------------------------------------------------------------------
 
1510
 
 
1511
The Command Line Options of LCDd
 
1512
 
 
1513
Running LCDd -h gives you an overview of the currently available command
 
1514
line options, including a list of the compiled in drivers.
 
1515
 
 
1516
 
 
1517
Example 1. LCDd -h
 
1518
                                                                                    
 
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> ]                    
 
1524
                                                                                    
 
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)                                    
 
1537
                                                                                    
 
1538
Currently available drivers:                                                        
 
1539
        lcdm001, LCDM001, MtxOrb, MatrixOrbital, CFontz, CrystalFontz, LB216, text, 
 
1540
        curses, ncurses, BayRAD, glk, glc                                           
 
1541
 
30
1542
                                                                                  
 
1543
---------------------------------------------------------------------------
 
1544
 
 
1545
Running lcdproc
 
1546
 
 
1547
You will probably more often run lcdproc from the command line than you
 
1548
will run LCDd.
 
1549
---------------------------------------------------------------------------
 
1550
 
 
1551
The Command Line Options of lcdproc
 
1552
 
 
1553
Running lcdproc -h gives you an overview of the currently available command
 
1554
line options.
 
1555
 
 
1556
 
 
1557
Example 2. lcdproc -h
 
1558
                                                                               
 
1559
                                                                               
 
1560
LCDproc, 0.4.3dev                                                              
 
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] 
 
1566
                        [A]bout                                                
 
1567
                                                                               
 
1568
        Use "man lcdproc" for more info.                                       
 
1569
Example:                                                                       
 
1570
        lcdproc -s my.lcdproc.server.com C M X -p 13666
31
1571
                      
 
1572
 
 
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
---------------------------------------------------------------------------
 
1577
 
 
1578
Contact Us
 
1579
 
 
1580
Errata
 
1581
 
 
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.
 
1584
 
 
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.
 
1588
 
 
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
---------------------------------------------------------------------------
 
1594
 
 
1595
The LCDproc Mailing List
 
1596
 
 
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.
 
1599
 
 
1600
For details on how to subscribe to the list see http://
 
1601
lcdproc.omnipotent.net/mail.php3.
 
1602
 
 
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
 
1606
copyrights).
 
1607
---------------------------------------------------------------------------
 
1608
 
 
1609
Reporting Bugs
 
1610
 
 
1611
Possibly you will find a bug in the LCDproc distribution. Before reporting
 
1612
this to the mailing list, please respect the following:
 
1613
 
 
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.
 
1618
   
 
1619
  * Especially LCDd might need certain privileges to execute a command.
 
1620
    Make sure LCDd HAS the rights to do so.
 
1621
   
 
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.
 
1625
   
 
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
 
1630
    us a mail.
 
1631
   
 
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
 
1635
   
 
1636
 
 
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.
 
1641
 
 
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.