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 customisable wiring of displays and user options for drivers included in
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
passing options when initialising a driver in serdisplib:
intro
starting with version 1.95 options may be set in serdisplib.
an option is a key-value pair, more options can be combined using semi-colons as separators.
the resulting option string is passed to serdisplib using the third parameter of the init-function
eg.:
an option is a key-value pair, more options can be combined using semi-colons as separators.
the resulting option string is passed to serdisplib using the third parameter of the init-function
serdisp_init()eg.:
serdisp_init(sdcd, "PCD8544", "WIRING=1;INVERT=YES");
definition
a option string is defined using the following notation:
OPTIONSTRING := OPTION { ';' OPTION }
OPTION := WIRINGOPT | KEYVALUE
KEYVALUE := OPTIDENT '=' OPTVALUE
OPTIDENT := /* driver specific option identifiers */
OPTVALUE := /* driver specific values or defines */
WIRINGOPT := ( 'WIRING' | 'WIRE' ) '=' WIRINGDEF
WIRINGDEF := /* one of: identifier, numeric id or a customisable wiring
(section 'customisable wiring in serdisplib') */
annotations:
- identifiers and values are case insensitive (eg.:
"wiring=powerlcd" == "WIRING=PowerLCD") - whitespaces are ignored (valid:
" wiring = powerlcd ; INVERT =yes ") - some identifiers may have short forms, some values textual aliases
(eg.:
"width=128"=="w=128","invert=1"=="inv=yes") - identifiers and corresponding values and aliases are driver specific and can be found in the driver hardware pages (menu item 'passing options')
top ^
customisable wiring in serdisplib:
intro
starting with version 1.95 serdisplib supports customisable wiring.
a wiring definition may be either an identifier, a numeric id, or a string containing key-value pairs for maximum flexibility.
a wiring definition may be either an identifier, a numeric id, or a string containing key-value pairs for maximum flexibility.
examples:
"WIRING=PowerLCD"
"WIRING=1"
"WIRING=DATA8,CS:nAUTO,A0:INIT,WR:nSTRB,RD:nSELIN"
the first two ways to define a wiring (identifier and number) are listed in the section above, this section deals with the third way to do so: a string containing key-value pairs. using this, a user defined wiring can be 'composed'.
definition
a customisable wiring is defined using the following notation:
CUSTWIRING := [ DATABUS ',' ] DISPSIG ':' IODEVSIGID { ',' DISPSIG ':' IODEVSIGID }
DATABUS := 'DATA8'
DISPSIG := '1' | DISPSIGID
IODEVSIGID := /* signal names defined for a certain IO-device */
DISPSIGID := /* individual - depends on display used */
annotations:
DATABUSdefines a data bus using 4, 8, 16, ... wires. thus,DATA8means, thatD0-D7is used for an 8 wire bus.
for now, onlyDATA8is defined.
a DATABUS-definition has to be at the beginning of the definition string!DISPSIGeither defines an identifier of a display signal -DISPSIGID(eg:CS) or1which means that the corresponding I/O device signal is permanently high (== 1).IODEVSIGIDdefines an identifier of an I/O device (eg:nAUTO).
I/O device signal identifuers are dependend on the I/O device used!DISPSIGIDdefines an identifier of a display signal (eg:CS).
display signal identifiers are dependend on the display used!- active-low vs. hardware-invertion clashed are solved self-acting by serdisplib!
eg: display signalCSis active-high but wired to parallel port signalD0which is not hardware-inverted: serdisplib solves the invertion needed automatically.
example 1:
- custom wiring for a parallel driven display:
- pinout:
D0 - D7 .. data bus CS .. chip select (active low) A0 .. command or data WR .. write strobe (active low) RD .. read signal (active low) RESET .. reset signal (active low) - reset signal
RESETis hard wired to a R/C reset circuit and thus needs not to be in the wiring string - display will be connected to a parallel port, it's signal identifiers are listed in a section below
D0-D7define a data bus, soDATA8is used.D0needs to be wired to pin 2 (D0),D1to pin 3 (D1), a.s.o.CSis wired to pin 14, thus one ofnAUTO, nAUTOFD, nLINEFD, orC1may be used as identifierA0is wired to pin 16 -->INITWRis wired to pin 1 -->nSTRBRDis wired to pin 17 -->nSELIN- active low vs. hardware inverted parallel port signals are solved by serdisplib
- putting all this together:
DATA8,CS:nAUTO,A0:INIT,WR:nSTRB,RD:nSELIN
example 2:
- custom wiring for a serial driven display:
- pinout:
SI .. serial data input SCL .. clock DC .. command or data CS .. chip select (active low) RESET .. reset signal (active low) CSis hard wired to GND (chip always selected)SIis wired to pin 1 -->nSTRBSCLis wired to pin 14 -->nLINEFD(ornAUTO, ...)DCis wired to pin 2 -->D0RESETis wired to pin 3 -->D1- pins 4 and 5 are used to supply the display with power --> they need to be permanently high (==1), so
1:D2and1:D3is used - clashes 'active low vs. hardware inverted parallel port signals' (e.g.:
RESETis active low, butD1is not hardware inverted) are solved by serdisplib, thus a user doesn't need to care about this - putting all this together:
1:D2,1:D3,SI:nSTRB,SCL:nLINEFD,DC:D0,RESET:D1
parallel port

dsub 25 connector (pc view)
| pin # | defined identifiers in serdisplib | hardware inverted | direction | description |
|---|---|---|---|---|
| 1 | C0, nSTROBE, nSTRB | * | ---> | strobe |
| 2 | D0 | <--> | data bit 0 (bi-directional) | |
| 3 | D1 | <--> | data bit 1 | |
| 4 | D2 | <--> | data bit 2 | |
| 5 | D3 | <--> | data bit 3 | |
| 6 | D4 | <--> | data bit 4 | |
| 7 | D5 | <--> | data bit 5 | |
| 8 | D6 | <--> | data bit 6 | |
| 9 | D7 | <--> | data bit 7 | |
| 10 | S6, ACK, ACKNOWLEDGE | <--- | acknowledge | |
| 11 | S7, nBUSY | * | <--- | busy |
| 12 | S5, PE, PERROR | <--- | paper end | |
| 13 | S4, SELECT, SLCT | <--- | select | |
| 14 | C1, nLINEFD, nAUTO, nAUTOFD | * | ---> | autofeed |
| 15 | S3, ERROR | <--- | error | |
| 16 | C2, INIT | ---> | initialise | |
| 17 | C3, nSELECT, nSELIN, nSEL | * | ---> | select in |
| 18-25 | --- | ---- | GND (ground) |
top ^
links:
| hardware | |||
|---|---|---|---|
| The Hardware Book | internet's largest free collection of connector pinouts and cable descriptions | (english) | http://www.hardwarebook.net |
| Beyond Logic | interfacing the PC | (english) | http://www.beyondlogic.org |
top ^