disclaimer / info:
DISCLAIMER:
THIS IS EXPERIMENTAL SOFTWARE AND HARDWARE. USE AT YOUR OWN RISK. THE MAINTAINER(S) OF THESE PAGES AND THE DEVELOPER(S) OF SOFTWARE AND HARDWARE PRESENTED ON THESE PAGES CAN NOT BE HELD LIABLE UNDER ANY CIRCUMSTANCES FOR DAMAGE TO HARDWARE OR SOFTWARE, LOST DATA, OR OTHER DIRECT OR INDIRECT DAMAGE RESULTING FROM THE USE OF THIS SOFTWARE OR HARDWARE. IF YOU DO NOT AGREE TO THESE CONDITIONS, YOU ARE NOT PERMITTED TO USE OR FURTHER DISTRIBUTE THIS SOFTWARE OR TO USE ANY TEMPLATES FOR BUILDING HARDWARE PRESENTED HERE.
- this page deals with connecting ks0108-based displays to a parallel port and drive it using
serdisplib
- i'm not responsible for the content of external web pages
- external web pages will generally open in separate browser windows or tabs
- english is not my native language. please keep that in mind (corrections of english grammar and formulations are very welcome!)
- email: mrwastl at users.sourceforge.net
ks0108 lcd controller:
description
Samsung KS0108 is a generic display controller found in certain display modules.
The following controllers are known to be compliant to KS0108:
- Samsung S6B0108 (verified)
- Samsung S6B0708
- Samsung S6B2108
- Samsung KS0708
- Hitachi HD61202
- Neotec NT7108
- AX6108
specifications | |
---|---|
resolution | 64x64 per controller, up to 4 controllers supported (=> 256x64) |
colours | monochrome |
controller | KS0108 or compliant |
adjustable contrast | no |
name in serdisplib |
"KS0108 " (example: serdisp_init(sdcd, "KS0108", ""); ) |
some images
test image generated by testserdisp |
output generated by graphlcd |
256x64 display module running on PC-BSD / FreeBSD | test output generated by multidisplay on a 256x64 display module |
top ^
connecting a ks0108-based display to the parallel port:
intro
serdisplib supports the standard wiring that is used by most projects around the ned, but user specific wiring is also possible through customisable wiring
pre-defined wiring
- valid for all pre-defined wirings:
D0
toD7
are wired to pin 2 to 9 - "
WIRING=Standard
"A0 .. pin 17 (nSELIN) CS1 .. pin 14 (nAUTO) CS2 .. pin 16 (INIT) EN .. pin 1 (nSTRB)
CS multiplexing
if a display with more than two controllers is used the two cable select lines (CS1 and CS2) are automatically switched into multiplexing mode:
any de-multiplexing chip with the following features can be used:
CS signals selected controller
(active low)1 2 L L 0 H L 1 L H 2 H H 3
- at least 2 address input lines (two lines are used)
- at least 3 (192x64) or 4 (256x64) output lines
- output lines are active low
examples:
- 74HC138 or similar:
__ __ __ __ __ __ __ Vdd Y0 Y1 Y2 Y3 Y4 Y5 Y6 A0 .. CS1 A1 .. CS2 | | | | | | | | A2 .. -> GND 16 15 14 13 12 11 10 09 -------------------------------- /Y0 .. /CS on controller 0 | | /Y1 .. /CS on controller 1 > 74HC138 | /Y2 .. /CS on controller 2 | | /Y3 .. /CS on controller 3 -------------------------------- 01 02 03 04 05 06 07 08 or, if A2 -> Vdd: /Y4-/Y7 are used instead of /Y0-/Y3 | | | | | | | | __ __ __ A0 A1 A2 E1 E2 E3 Y7 GND /E1,/E2,E3 .. according to datasheet (/E1,/E2 -> GND, E3 -> Vdd)
- 74LS42 or similar:
different pin-out than 74HC138 but comparable functionality
top ^
passing options through serdisp_init():
intro
using the third parameter of
common information about passing options and customisable wiring can be found in a separate document.
serdisp_init()
, driver specific options and custom wiring can be set.common information about passing options and customisable wiring can be found in a separate document.
examples: serdisp_init(sdcd, "KS0108", "WIDTH=256"); serdisp_init(sdcd, "KS0108", "W=256;DELAY=1");
options
identifier | short | remark | default |
---|---|---|---|
WIDTH | W | width of display | 128 |
HEIGHT | H | height of display | 64 |
ROTATE | ROT | rotate display (1 == 180 degrees) | 0 |
INVERT | INV | invert display | 0 |
DELAY | delay after each write/read operation.0 .. no delay 1 .. one call of gettimeofday() >1 .. delay at least x nanoseconds | 180 | |
WIRING | WIRE | pre-defined or customisable wiring | 0 |
ranges, aliases
identifier | range | aliases |
---|---|---|
WIDTH | 64, 128, 192, 256 | |
HEIGHT | 64 | |
ROTATE | 0, 1, 90, 180, 270 | YES=180, NO=0, TRUE=180, FALSE=0 |
INVERT | 0, 1 | YES=1, NO=0, TRUE=1, FALSE=0 |
DELAY | >= 0 | NONE=0 |
pre-defined wiring definitions
identifier | numeric id | protocol | description |
---|---|---|---|
Standard | 0 | PAR | Standard wiring |
display signals
identifier | description | mandatory |
---|---|---|
D0 - D7 | 8 bit wide data bus | * |
A0 or RS | data or command | * |
CS1 | first chip select input (or multiplexer 1st selector) | * |
CS2 | second chip select input (or multiplexer 2nd selector) | |
EN or E | enable signal | * |
top ^
links:
controller KS0108 | |||
---|---|---|---|
technical reference | local copy of KS0108 technical reference | (english) | ks0108b.pdf |
top ^
history:
2009-12-02 | description for standard wiring corrected (thanks to Tommy for finding this error) |
2009-11-07 | typos corrected: 74HC128 -> 74HC138 (diagram was right but description was not) |
2008-07-24 | first release of hardware page |
top ^