cfag12864b 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. ===================================
  2. cfag12864b LCD Driver Documentation
  3. ===================================
  4. License: GPLv2
  5. Author & Maintainer: Miguel Ojeda Sandonis
  6. Date: 2006-10-27
  7. --------
  8. 0. INDEX
  9. --------
  10. 1. DRIVER INFORMATION
  11. 2. DEVICE INFORMATION
  12. 3. WIRING
  13. 4. USERSPACE PROGRAMMING
  14. ---------------------
  15. 1. DRIVER INFORMATION
  16. ---------------------
  17. This driver supports a cfag12864b LCD.
  18. ---------------------
  19. 2. DEVICE INFORMATION
  20. ---------------------
  21. Manufacturer: Crystalfontz
  22. Device Name: Crystalfontz 12864b LCD Series
  23. Device Code: cfag12864b
  24. Webpage: http://www.crystalfontz.com
  25. Device Webpage: http://www.crystalfontz.com/products/12864b/
  26. Type: LCD (Liquid Crystal Display)
  27. Width: 128
  28. Height: 64
  29. Colors: 2 (B/N)
  30. Controller: ks0108
  31. Controllers: 2
  32. Pages: 8 each controller
  33. Addresses: 64 each page
  34. Data size: 1 byte each address
  35. Memory size: 2 * 8 * 64 * 1 = 1024 bytes = 1 Kbyte
  36. ---------
  37. 3. WIRING
  38. ---------
  39. The cfag12864b LCD Series don't have official wiring.
  40. The common wiring is done to the parallel port as shown:
  41. Parallel Port cfag12864b
  42. Name Pin# Pin# Name
  43. Strobe ( 1)------------------------------(17) Enable
  44. Data 0 ( 2)------------------------------( 4) Data 0
  45. Data 1 ( 3)------------------------------( 5) Data 1
  46. Data 2 ( 4)------------------------------( 6) Data 2
  47. Data 3 ( 5)------------------------------( 7) Data 3
  48. Data 4 ( 6)------------------------------( 8) Data 4
  49. Data 5 ( 7)------------------------------( 9) Data 5
  50. Data 6 ( 8)------------------------------(10) Data 6
  51. Data 7 ( 9)------------------------------(11) Data 7
  52. (10) [+5v]---( 1) Vdd
  53. (11) [GND]---( 2) Ground
  54. (12) [+5v]---(14) Reset
  55. (13) [GND]---(15) Read / Write
  56. Line (14)------------------------------(13) Controller Select 1
  57. (15)
  58. Init (16)------------------------------(12) Controller Select 2
  59. Select (17)------------------------------(16) Data / Instruction
  60. Ground (18)---[GND] [+5v]---(19) LED +
  61. Ground (19)---[GND]
  62. Ground (20)---[GND] E A Values:
  63. Ground (21)---[GND] [GND]---[P1]---(18) Vee - R = Resistor = 22 ohm
  64. Ground (22)---[GND] | - P1 = Preset = 10 Kohm
  65. Ground (23)---[GND] ---- S ------( 3) V0 - P2 = Preset = 1 Kohm
  66. Ground (24)---[GND] | |
  67. Ground (25)---[GND] [GND]---[P2]---[R]---(20) LED -
  68. ------------------------
  69. 4. USERSPACE PROGRAMMING
  70. ------------------------
  71. The cfag12864bfb describes a framebuffer device (/dev/fbX).
  72. It has a size of 1024 bytes = 1 Kbyte.
  73. Each bit represents one pixel. If the bit is high, the pixel will
  74. turn on. If the pixel is low, the pixel will turn off.
  75. You can use the framebuffer as a file: fopen, fwrite, fclose...
  76. Although the LCD won't get updated until the next refresh time arrives.
  77. Also, you can mmap the framebuffer: open & mmap, munmap & close...
  78. which is the best option for most uses.
  79. Check Documentation/auxdisplay/cfag12864b-example.c
  80. for a real working userspace complete program with usage examples.