root@4
|
1 |
---------------------------------------------------------------------
|
root@4
|
2 |
GraphLCD driver library
|
root@4
|
3 |
|
root@4
|
4 |
The KS0108 driver
|
root@4
|
5 |
---------------------------------------------------------------------
|
root@4
|
6 |
|
root@4
|
7 |
Description
|
root@4
|
8 |
-----------
|
root@4
|
9 |
The KS0108 driver supports LC displays that use the Samsung KS0108
|
root@4
|
10 |
controller, connected to the parallel port of your PC.
|
root@4
|
11 |
|
root@4
|
12 |
|
root@4
|
13 |
Wirings
|
root@4
|
14 |
-------
|
root@4
|
15 |
The KS0108 driver supports the following connection on a parallel
|
root@4
|
16 |
port:
|
root@4
|
17 |
|
root@4
|
18 |
printerport LCD other
|
root@4
|
19 |
----------- ---------- ----------
|
root@4
|
20 |
GND (18) GND (01) GND (Ground)
|
root@4
|
21 |
Vdd (02) +5V
|
root@4
|
22 |
Vo (03) (LCD Contrast In)
|
root@4
|
23 |
nSEL (17) R/S (04) (Register Select)
|
root@4
|
24 |
R/W (05) GND (Read/Write)
|
root@4
|
25 |
nSTRB (01) EN (06) (Enable)
|
root@4
|
26 |
D0 (02) D0 (07) (DataBit0)
|
root@4
|
27 |
D1 (03) D1 (08) (DataBit1)
|
root@4
|
28 |
D2 (04) D2 (09) (DataBit2)
|
root@4
|
29 |
D3 (05) D3 (10) (DataBit3)
|
root@4
|
30 |
D4 (06) D4 (11) (DataBit4)
|
root@4
|
31 |
D5 (07) D5 (12) (DataBit5)
|
root@4
|
32 |
D6 (08) D6 (13) (DataBit6)
|
root@4
|
33 |
D7 (09) D7 (14) (DataBit7)
|
root@4
|
34 |
nAUTO (14) CS1 (15) (ChipSelect Controller 1)
|
root@4
|
35 |
INIT (16) CS2 (16) (ChipSelect Controller 2)
|
root@4
|
36 |
RESET (17) +5V (Controller Reset)
|
root@4
|
37 |
Vout (18) (Contrast Out)
|
root@4
|
38 |
LED+ (19) +4V (Backlight)
|
root@4
|
39 |
LED- (20) GND (Backlight GND)
|
root@4
|
40 |
|
root@4
|
41 |
Note: The pin numbering may vary with other displays.
|
root@4
|
42 |
|
root@4
|
43 |
If you want to connect a 192x64 or 256x64 display (with 3 or 4
|
root@4
|
44 |
ChipSelects) or two 128x64 displays, you must add a binary decoder for
|
root@4
|
45 |
the ChipSelect lines. The mode ist auto-selected based on the width and
|
root@4
|
46 |
height parameters.
|
root@4
|
47 |
|
root@4
|
48 |
nAUTO (14)
|
root@4
|
49 |
| INIT (16)
|
root@4
|
50 |
Vdd | | GND GND
|
root@4
|
51 |
| | | | |
|
root@4
|
52 |
16 15 14 13 12 11 10 09
|
root@4
|
53 |
--------------------------------
|
root@4
|
54 |
| |
|
root@4
|
55 |
> |
|
root@4
|
56 |
| |
|
root@4
|
57 |
--------------------------------
|
root@4
|
58 |
01 02 03 04 05 06 07 08
|
root@4
|
59 |
| | | | |
|
root@4
|
60 |
CS1 | | | GND
|
root@4
|
61 |
CS2 | CS4 (CS2 second LCD)
|
root@4
|
62 |
CS3 (CS1 second LCD)
|
root@4
|
63 |
|
root@4
|
64 |
|
root@4
|
65 |
Configuration Parameters
|
root@4
|
66 |
------------------------
|
root@4
|
67 |
The KS0108 driver supports the following parameters in config file:
|
root@4
|
68 |
|
root@4
|
69 |
Device
|
root@4
|
70 |
Instead of using the direct output via port address (see Port), you
|
root@4
|
71 |
can use the parport device (/dev/parportX). The advantage over the
|
root@4
|
72 |
direct output via port address is that this works for non-root users
|
root@4
|
73 |
also. But it's a little bit slower. The modules ppdev.o, parport.o
|
root@4
|
74 |
and parport_pc.o must be loaded or compiled into the kernel.
|
root@4
|
75 |
|
root@4
|
76 |
Port
|
root@4
|
77 |
Sets the port address of the parallel port. If this parameter is not
|
root@4
|
78 |
given, 0x378 is used. To use this direct output, the program that
|
root@4
|
79 |
uses the driver library has to be started with user 'root'.
|
root@4
|
80 |
|
root@4
|
81 |
Width
|
root@4
|
82 |
Sets the horizontal size of the display. If this parameter is not
|
root@4
|
83 |
given, a default value of 128 pixels is used.
|
root@4
|
84 |
|
root@4
|
85 |
Height
|
root@4
|
86 |
Sets the vertical size of the display. If this parameter is not
|
root@4
|
87 |
given, a default value of 64 pixels is used.
|
root@4
|
88 |
|
root@4
|
89 |
UpsideDown
|
root@4
|
90 |
Rotates the display output by 180 degrees. This might be useful, if
|
root@4
|
91 |
the LCD is mounted upside-down.
|
root@4
|
92 |
Possible values: 'yes', 'no'
|
root@4
|
93 |
Default value: 'no'
|
root@4
|
94 |
|
root@4
|
95 |
Invert
|
root@4
|
96 |
Inverts the display.
|
root@4
|
97 |
Possible values: 'yes', 'no'
|
root@4
|
98 |
Default value: 'no'
|
root@4
|
99 |
|
root@4
|
100 |
AdjustTiming
|
root@4
|
101 |
To get a timing that is as accurate as possible, the drivers measure
|
root@4
|
102 |
the time for port commands (see: benchmark in syslog). You might
|
root@4
|
103 |
decrease or increase the time to wait after port commands with this
|
root@4
|
104 |
parameter. Normally, there is no need to change this parameter.
|
root@4
|
105 |
Possible values: -50 <= x <= 50
|
root@4
|
106 |
Default value: 0
|
root@4
|
107 |
|
root@4
|
108 |
RefreshDisplay
|
root@4
|
109 |
Normally, most of the drivers do not update the whole display, but
|
root@4
|
110 |
only the areas that have changed since last update. So it might be,
|
root@4
|
111 |
that some faulty pixels would stay a longer time. To avoid this, the
|
root@4
|
112 |
plugin makes a complete refresh from time to time. This parameter
|
root@4
|
113 |
defines how often a complete refresh will be done.
|
root@4
|
114 |
e.g.: A value of 5 means, that the plugin will make a complete
|
root@4
|
115 |
refresh on every 5th update.
|
root@4
|
116 |
A value of 0 completely disables complete refreshs.
|
root@4
|
117 |
Possible values: 0 <= x <= 50
|
root@4
|
118 |
Default value: 5
|
root@4
|
119 |
|
root@4
|
120 |
Control
|
root@4
|
121 |
Sets the variant of setting the display control lines.
|
root@4
|
122 |
Possible values: 0, 1
|
root@4
|
123 |
Default value: 1
|
root@4
|
124 |
|