aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/auxdisplay/cfag12864b
diff options
context:
space:
mode:
authorMiguel Ojeda Sandonis <maxextreme@gmail.com>2007-02-10 04:44:32 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 13:51:24 -0500
commit70e840499aae90be1de542894062ad2899d23642 (patch)
tree4d5122672bfb03fec0823540f19c7974979483f4 /Documentation/auxdisplay/cfag12864b
parent81d79bec348ab06cba9ae9fc03eb015b6b83703a (diff)
[PATCH] drivers: add LCD support
Add support for auxiliary displays, the ks0108 LCD controller, the cfag12864b LCD and adds a framebuffer device: cfag12864bfb. - Add a "auxdisplay/" folder in "drivers/" for auxiliary display drivers. - Add support for the ks0108 LCD Controller as a device driver. (uses parport interface) - Add support for the cfag12864b LCD as a device driver. (uses ks0108 LCD Controller driver) - Add a framebuffer device called cfag12864bfb. (uses cfag12864b LCD driver) - Add the usual Documentation, includes, Makefiles, Kconfigs, MAINTAINERS, CREDITS... - Miguel Ojeda will maintain all the stuff above. [rdunlap@xenotime.net: workqueue fixups] [akpm@osdl.org: kconfig fix] Signed-off-by: Miguel Ojeda Sandonis <maxextreme@gmail.com> Cc: Greg KH <greg@kroah.com> Acked-by: Paulo Marques <pmarques@grupopie.com> Cc: "Randy.Dunlap" <rdunlap@xenotime.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/auxdisplay/cfag12864b')
-rw-r--r--Documentation/auxdisplay/cfag12864b105
1 files changed, 105 insertions, 0 deletions
diff --git a/Documentation/auxdisplay/cfag12864b b/Documentation/auxdisplay/cfag12864b
new file mode 100644
index 000000000000..3572b98f45b8
--- /dev/null
+++ b/Documentation/auxdisplay/cfag12864b
@@ -0,0 +1,105 @@
1 ===================================
2 cfag12864b LCD Driver Documentation
3 ===================================
4
5License: GPLv2
6Author & Maintainer: Miguel Ojeda Sandonis <maxextreme@gmail.com>
7Date: 2006-10-27
8
9
10
11--------
120. INDEX
13--------
14
15 1. DRIVER INFORMATION
16 2. DEVICE INFORMATION
17 3. WIRING
18 4. USERSPACE PROGRAMMING
19
20
21---------------------
221. DRIVER INFORMATION
23---------------------
24
25This driver support one cfag12864b display at time.
26
27
28---------------------
292. DEVICE INFORMATION
30---------------------
31
32Manufacturer: Crystalfontz
33Device Name: Crystalfontz 12864b LCD Series
34Device Code: cfag12864b
35Webpage: http://www.crystalfontz.com
36Device Webpage: http://www.crystalfontz.com/products/12864b/
37Type: LCD (Liquid Crystal Display)
38Width: 128
39Height: 64
40Colors: 2 (B/N)
41Controller: ks0108
42Controllers: 2
43Pages: 8 each controller
44Addresses: 64 each page
45Data size: 1 byte each address
46Memory size: 2 * 8 * 64 * 1 = 1024 bytes = 1 Kbyte
47
48
49---------
503. WIRING
51---------
52
53The cfag12864b LCD Series don't have official wiring.
54
55The common wiring is done to the parallel port as shown:
56
57Parallel Port cfag12864b
58
59 Name Pin# Pin# Name
60
61Strobe ( 1)------------------------------(17) Enable
62Data 0 ( 2)------------------------------( 4) Data 0
63Data 1 ( 3)------------------------------( 5) Data 1
64Data 2 ( 4)------------------------------( 6) Data 2
65Data 3 ( 5)------------------------------( 7) Data 3
66Data 4 ( 6)------------------------------( 8) Data 4
67Data 5 ( 7)------------------------------( 9) Data 5
68Data 6 ( 8)------------------------------(10) Data 6
69Data 7 ( 9)------------------------------(11) Data 7
70 (10) [+5v]---( 1) Vdd
71 (11) [GND]---( 2) Ground
72 (12) [+5v]---(14) Reset
73 (13) [GND]---(15) Read / Write
74 Line (14)------------------------------(13) Controller Select 1
75 (15)
76 Init (16)------------------------------(12) Controller Select 2
77Select (17)------------------------------(16) Data / Instruction
78Ground (18)---[GND] [+5v]---(19) LED +
79Ground (19)---[GND]
80Ground (20)---[GND] E A Values:
81Ground (21)---[GND] [GND]---[P1]---(18) Vee · R = Resistor = 22 ohm
82Ground (22)---[GND] | · P1 = Preset = 10 Kohm
83Ground (23)---[GND] ---- S ------( 3) V0 · P2 = Preset = 1 Kohm
84Ground (24)---[GND] | |
85Ground (25)---[GND] [GND]---[P2]---[R]---(20) LED -
86
87
88------------------------
894. USERSPACE PROGRAMMING
90------------------------
91
92The cfag12864bfb describes a framebuffer device (/dev/fbX).
93
94It has a size of 1024 bytes = 1 Kbyte.
95Each bit represents one pixel. If the bit is high, the pixel will
96turn on. If the pixel is low, the pixel will turn off.
97
98You can use the framebuffer as a file: fopen, fwrite, fclose...
99Although the LCD won't get updated until the next refresh time arrives.
100
101Also, you can mmap the framebuffer: open & mmap, munmap & close...
102which is the best option for most uses.
103
104Check Documentation/auxdisplay/cfag12864b-example.c
105for a real working userspace complete program with usage examples.