1 ===================================
2 cfag12864b LCD Driver Documentation
3 ===================================
6 Author & Maintainer: Miguel Ojeda Sandonis <maxextreme@gmail.com>
18 4. USERSPACE PROGRAMMING
25 This driver support one cfag12864b display at time.
32 Manufacturer: Crystalfontz
33 Device Name: Crystalfontz 12864b LCD Series
34 Device Code: cfag12864b
35 Webpage: http://www.crystalfontz.com
36 Device Webpage: http://www.crystalfontz.com/products/12864b/
37 Type: LCD (Liquid Crystal Display)
43 Pages: 8 each controller
44 Addresses: 64 each page
45 Data size: 1 byte each address
46 Memory size: 2 * 8 * 64 * 1 = 1024 bytes = 1 Kbyte
53 The cfag12864b LCD Series don't have official wiring.
55 The common wiring is done to the parallel port as shown:
57 Parallel Port cfag12864b
61 Strobe ( 1)------------------------------(17) Enable
62 Data 0 ( 2)------------------------------( 4) Data 0
63 Data 1 ( 3)------------------------------( 5) Data 1
64 Data 2 ( 4)------------------------------( 6) Data 2
65 Data 3 ( 5)------------------------------( 7) Data 3
66 Data 4 ( 6)------------------------------( 8) Data 4
67 Data 5 ( 7)------------------------------( 9) Data 5
68 Data 6 ( 8)------------------------------(10) Data 6
69 Data 7 ( 9)------------------------------(11) Data 7
71 (11) [GND]---( 2) Ground
72 (12) [+5v]---(14) Reset
73 (13) [GND]---(15) Read / Write
74 Line (14)------------------------------(13) Controller Select 1
76 Init (16)------------------------------(12) Controller Select 2
77 Select (17)------------------------------(16) Data / Instruction
78 Ground (18)---[GND] [+5v]---(19) LED +
80 Ground (20)---[GND] E A Values:
81 Ground (21)---[GND] [GND]---[P1]---(18) Vee · R = Resistor = 22 ohm
82 Ground (22)---[GND] | · P1 = Preset = 10 Kohm
83 Ground (23)---[GND] ---- S ------( 3) V0 · P2 = Preset = 1 Kohm
84 Ground (24)---[GND] | |
85 Ground (25)---[GND] [GND]---[P2]---[R]---(20) LED -
88 ------------------------
89 4. USERSPACE PROGRAMMING
90 ------------------------
92 The cfag12864bfb describes a framebuffer device (/dev/fbX).
94 It has a size of 1024 bytes = 1 Kbyte.
95 Each bit represents one pixel. If the bit is high, the pixel will
96 turn on. If the pixel is low, the pixel will turn off.
98 You can use the framebuffer as a file: fopen, fwrite, fclose...
99 Although the LCD won't get updated until the next refresh time arrives.
101 Also, you can mmap the framebuffer: open & mmap, munmap & close...
102 which is the best option for most uses.
104 Check Documentation/auxdisplay/cfag12864b-example.c
105 for a real working userspace complete program with usage examples.