99 lines · plain
1===================================2cfag12864b LCD Driver Documentation3===================================4 5:License: GPLv26:Author & Maintainer: Miguel Ojeda <ojeda@kernel.org>7:Date: 2006-10-278 9 10 11.. INDEX12 13 1. DRIVER INFORMATION14 2. DEVICE INFORMATION15 3. WIRING16 4. USERSPACE PROGRAMMING17 181. Driver Information19---------------------20 21This driver supports a cfag12864b LCD.22 23 242. Device Information25---------------------26 27:Manufacturer: Crystalfontz28:Device Name: Crystalfontz 12864b LCD Series29:Device Code: cfag12864b30:Webpage: http://www.crystalfontz.com31:Device Webpage: http://www.crystalfontz.com/products/12864b/32:Type: LCD (Liquid Crystal Display)33:Width: 12834:Height: 6435:Colors: 2 (B/N)36:Controller: ks010837:Controllers: 238:Pages: 8 each controller39:Addresses: 64 each page40:Data size: 1 byte each address41:Memory size: 2 * 8 * 64 * 1 = 1024 bytes = 1 Kbyte42 43 443. Wiring45---------46 47The cfag12864b LCD Series don't have official wiring.48 49The common wiring is done to the parallel port as shown::50 51 Parallel Port cfag12864b52 53 Name Pin# Pin# Name54 55 Strobe ( 1)------------------------------(17) Enable56 Data 0 ( 2)------------------------------( 4) Data 057 Data 1 ( 3)------------------------------( 5) Data 158 Data 2 ( 4)------------------------------( 6) Data 259 Data 3 ( 5)------------------------------( 7) Data 360 Data 4 ( 6)------------------------------( 8) Data 461 Data 5 ( 7)------------------------------( 9) Data 562 Data 6 ( 8)------------------------------(10) Data 663 Data 7 ( 9)------------------------------(11) Data 764 (10) [+5v]---( 1) Vdd65 (11) [GND]---( 2) Ground66 (12) [+5v]---(14) Reset67 (13) [GND]---(15) Read / Write68 Line (14)------------------------------(13) Controller Select 169 (15)70 Init (16)------------------------------(12) Controller Select 271 Select (17)------------------------------(16) Data / Instruction72 Ground (18)---[GND] [+5v]---(19) LED +73 Ground (19)---[GND]74 Ground (20)---[GND] E A Values:75 Ground (21)---[GND] [GND]---[P1]---(18) Vee - R = Resistor = 22 ohm76 Ground (22)---[GND] | - P1 = Preset = 10 Kohm77 Ground (23)---[GND] ---- S ------( 3) V0 - P2 = Preset = 1 Kohm78 Ground (24)---[GND] | |79 Ground (25)---[GND] [GND]---[P2]---[R]---(20) LED -80 81 824. Userspace Programming83------------------------84 85The cfag12864bfb describes a framebuffer device (/dev/fbX).86 87It has a size of 1024 bytes = 1 Kbyte.88Each bit represents one pixel. If the bit is high, the pixel will89turn on. If the pixel is low, the pixel will turn off.90 91You can use the framebuffer as a file: fopen, fwrite, fclose...92Although the LCD won't get updated until the next refresh time arrives.93 94Also, you can mmap the framebuffer: open & mmap, munmap & close...95which is the best option for most uses.96 97Check samples/auxdisplay/cfag12864b-example.c98for a real working userspace complete program with usage examples.99