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 an pcd8544-based display 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
pcd8544-based displays (+ compliant ones):
description
specifications | |
---|---|
resolution | 84x48 |
colours | monochrome |
controller | pcd8544 |
backlight | no, but with some skills the background light (4 to 6 LEDs, green) laying on the cellphone board can be used |
adjustable contrast | yes, programmable |
dimensions |
LPH7366: module: 38.4 x 33 mm, display area: 29 x 19.5 mm (datasheet) LPH7779: module: 38.5 x 35 mm, display area: 30 x 22 mm (measured) |
names in serdisplib |
PCD8544 ... generic for LPH7366, LPH7677, and LPH7779; no backlight ("WIRING=1 ")LPH7366 ... LPH7366 only, with backlight support ("WIRING=0 ")examples: serdisp_init(sdcd, "PCD8544", ""); serdisp_init(sdcd, "LPH7366", ""); |
specifications LPH7690 | |
---|---|
resolution | 90x60 |
colours | monochrome |
controller | pcd8544 compliant commands |
backlight | no |
adjustable contrast | yes, programmable |
dimensions | |
name in serdisplib |
LPH7690 (example: serdisp_init(sdcd, "LPH7690", ""); ) |
different display connector and board types
different display models | |||
---|---|---|---|
model name (of display) | type | nokia cellphones | |
LPH 7366 | 2 | Nokia 5110, 5120, 5130, 5160, 6110, 6150 | |
LPH 7677 | 1 | Nokia 3210 | |
LPH 7779 | 1 | Nokia 3310, 3315, 3330, 3350, 3410 | |
LPH 7690 | 1 | Nokia 6210 | |
further ones (list will be updated) ... |
(digits in brackets show the marks in the following pictures)
|
different display types in bigger view + pin 1 positions |
ad type 2: recycling the circuit board using a 'dremel' (or similar). red lines indicate where to cut through |
ad type 2: i used a flex cable because i damaged the connector pad. as all leds are wired together, you only have to find two positions where to solder the wires so that the leds can be connected. i drilled two tiny holes through the circuit board (red arrows) and soldered a wire directly to a cathode and the other wire to an anode |
some images
type 2 display finished and working | output generated by graphlcd |
connecting a pcd8544-based display to the parallel port:
intro
updates
- 2004-04-29
- a severe mistake is now corrected: the pin-order was swapped in the photos
(and at two positions in the description)!
when you look at the display in rear view with connectors at the bottom-line, pin 1 is rightmost (not leftmost)!but: ascii arts in the source code of the library (
serdisp_specific_pcd8544.h
) did not contain this mistake! - 2004-11-28
- when reviewing the source code i noticed that signal 'CS' is never used and may be safely
connected to GND. i updated circuits and descriptions to reflect this (CS slipped in from optrex323
when i adapted it's driver for pcd8544).
note: the functionality of serdisplib is NOT affected through this update (because CS wasn't used anyway)
- 2005-02-12
- some pcd8544-based displays (especially newer ones) run unstable if Vout is not connected. inserting
a capacitor avoids this. thanks to Michael Bülte for explaining this problem to me
added circuits using hardware reset (R/C-circuit) instead of /RES-wire
wiring
signals:
Type 1 displays +-------------------------+ | 1 2 3 4 5 6 7 8 | | # # # # # # # # | | ===#=#=#=#=#=#=#=#=== | 1 .. VDD +--=====================--+ 2 .. SCLK | | 3 .. SI | | 4 .. D/C | rear view | 5 .. /CS | connector is visible | 6 .. GND | | 7 .. Vout | LPH7779 | 8 .. /RES | | +-------------------------+ Signal name PC LCD Signal name --------------------------------------------------------- Data 0 2 3 SI serial data input of LCD Data 1 3 2 SCLK serial clock line of LCD Data 2 4 4 D/C (or sometimes named A0) command/data switch Data 5 7 8 /RES active low reset Data 7 9 - Backlight (optional, not on display) Ground 18 6 GND Ground for printer port and VDD -- 1 VDD +V (? mA) Chip power supply -- 5 /CS active low chip select (connected to GND) -- 7 Vout output of display-internal dc/dc converter Type 2 displays +--------------------------+ | 1 2 3 4 5 6 7 8 9 | | # # # # # # # # # | 1 .. VDD | ===#=#=#=#=#=#=#=#=#== | 2 .. SCLK +--======================--+ 3 .. SI | | 4 .. D/C | | 5 .. /CS | rear view | 6 .. Osc | connector is visible | 7 .. GND | | 8 .. Vout | LPH7366 | 9 .. /RES | | +--------------------------+ Signal name PC LCD Signal name --------------------------------------------------------- Data 0 2 3 SI serial data input of LCD Data 1 3 2 SCLK serial clock line of LCD Data 2 4 4 D/C (or sometimes labelled A0) command/data switch Data 5 7 9 /RES active low reset Data 7 9 - Backlight (optional, not on display) Ground 18 7 GND Ground for printer port and VDD -- 1 VDD +V (up to 7.4 mA) Chip power supply -- 5 /CS active low chip select (connected to GND) -- 6 Osc external clock (connected to VDD) -- 8 Vout output of display-internal dc/dc converter
circuits:
power supply for generating V+ needed by the following circuits
connecting 8-pin displays ('type 1') to the parallel port
connecting 9-pin displays ('type 2') to the parallel port
part list:
Part# Type Value Annotation --------------------------------------------------------------------------------------- R1 Resistor eg. 270 Ohm R2 Resistor eg. 330 Ohm C1, C2 Capacitor some uF not mandatory, for smoothing input voltage IC1 Var. Voltage Reg. LM317 (or similar) Vout should result in > 2.7V and < 3.3 V R3-R7 Resistor 1 kOhm R8 Var.Resistor eg. 100 Ohm or higher value if needed; or simply a resistor with fixed value C3 Capacitor 100 nF not mandatory; needed, if display is unstable (eg: only every 2nd row is visible, ...) T1 Transistor eg. BC547 D1 Diode eg. 1N4148
remarks:
type 2 displays (lph 7366) have 9 pins, type 1 displays (lph 7677, 7779) only have 8 pins. both circuits are illustrated above.
R7, R8, T1, D1 are needed in combination with LED background light only!
C1 and C2 are not mandatory, but at least C1 is recommended for smooth power supply.
C3 is only needed if the display runs unstable (possible erraneous effect: only every 2nd row is shown). thanks to Michael Bülte for this hint
R1 and R2 affect Vout of IC1 and are calculated using the following formula:Vout = 1.25 * (1 + (R2 / R1))usually (according to the data sheet of LM317) R1 should be 240 Ohm. i did not have such a resistor so i chose 270 Ohm. together with R2 = 330 Ohm i get Vout = 2.7777777 V.
that is at the lower limit of the specification of pcd8544. so maybe you should chose better values for R1 and R2.
i also tested a PJ 1084 (smd lowdrop adj. voltage reg.) as a replacement for the LM317 and it worked fine.
attention: different order of pins!
hardware reset vs. software reset:
to save one wire it is possible to replace the /RES-wire through a R/C-circuit.part-list is the same as above with the following exceptions:
Part# Type Value Annotation --------------------------------------------------------------------------------------- R3-R6 Resistor 1 kOhm R7 Resistor 10 kOhm C4 Capacitor 10 uF
8-pin displays ('type 1') with hardware reset
9-pin displays ('type 2') with hardware reset
- pro
- one wire less
- contra
- display can no longer be reset by software
addressing
pages vs. rows:
the display is organised in colums and pages: 8 pixel-rows are combined to a so called page.
as only whole bytes can be transferred to the display, a single pixel cannot be changed without knowing its 7 'neighbour' pixels.
so a display buffer was introduced in the library. pixel changes are all done in this buffer and in a separate step only changed 'page bytes' are transferred (using an optimising algorithm) to the display.
passing options through serdisp_init():
intro
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, "PCD8544", "WIRING=3;INVERT=YES"); serdisp_init(sdcd, "LPH7690", "WIRING=Rifer");
options
identifier | short | remark | default |
---|---|---|---|
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 | 0 | |
CONTRAST | set display contrast | 5 | |
BACKLIGHT | BG | switch background light on or off | 1 |
WIRING | WIRE | pre-defined or customisable wiring | LPH7366: 0 PCD8544: 1 LPH7690: 1 |
ranges, aliases
identifier | range | aliases |
---|---|---|
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 |
CONTRAST | [0, 10] | |
BACKLIGHT | 0, 1 | YES=1, NO=0, TRUE=1, FALSE=0, ON=1, OFF=0 |
pre-defined wiring definitions
identifier | numeric id | protocol | description |
---|---|---|---|
SerDispBG | 0 | PAR | SerDisp wiring, w/ backlight |
SerDisp | 1 | PAR | SerDisp wiring, w/o backlight |
SerDispBGHWRes | 2 | PAR | SerDisp wiring, w/ hardware reset, w/ backlight |
SerDispHWRes | 3 | PAR | SerDisp wiring, w/ hardware reset, w/o backlight |
Rifer | 4 | PAR | Rifer wiring |
Tuto3310 | 5 | PAR | Tuto3310 (David) wiring |
display signals
identifier | description | mandatory |
---|---|---|
SI | serial data input | * |
SCL | serial clock | * |
DC | data or command | * |
RESET | reset signal, active low; optional if wired to a hardware reset circuit | |
BACKLIGHT | backlight, optional |
annotations
PCD8544
,LPH7366
, andLPH7690
have different default wirings (->
table 'options')
links:
data sheets | |||
---|---|---|---|
pcd8544 controller | data sheet for PCD 8544 | (english) | pcd8544.pdf |
LPH 7366 | data sheet for LPH 7366 (display found in Nokia 5110 and 6150) | (english) | goldentek.pdf |
links to other projects | |||
---|---|---|---|
Berty's Home Page | pinouts, projects, ... for different LCDs. important source for my project | (english) | http://sandiding.tripod.com/Bertys.html |
LCD Nokia | controlling a nokia dispay using an ATMEL | (portuguese) | |
Electronics Projects <for you> | some projects using a nokia display controlled using a PIC | (english) | http://www.techdesign.be/projects.htm |
Nokia LCD Library | lcd library for an ATMEL to control a nokia display | (english) | http://www.microsyl.com -> Nokia LCD Lib |
history:
2005-05-07 | added LPH7690 displays added display name LPH7366 (with backlight support) in opposite to generic PCD8544 (no backlight support) adapted page for new css added section 'passing options' |
2005-02-12 | additional capacitor to avoid unstable displays circuits added using hardware reset instead of /RES-wire |
2004-11-28 | unused signal CS removed from circuits and descriptions |
2004-06-24 | display dimensions added more nokia phones, where compatible displays can be found, listed |
2004-04-29 | corrected a severe mistake: pinorder swapping |
2004-04-08 | learned new english technical expression: 'elastomer' (now replaces my creation 'contact rubber') update of possible connection methods |
2004-03-31 | added a remark that circuit is for 9 pin displays and what are the differences to 8 pin displays. |
2004-03-28 | added display name and code-example for serdisp_init() |
2004-03-18 | added nokia 5130 to display models (thx to hannsens) |
2004-02-22 | added nokia 6110 to display models re-did some pics some enhancements in 'part list' and 'remarks' |
2004-02-04 | pin #1 direction |
2004-01-24 | found the correct name for 'ribbon cable': flex cable (also learned: ZIF connector ...). didn't know the correct names in german either. now i know! |
2004-01-23 | corrected typo in formula for calculating resistors for lm317 (erraneous + instead of *) |
2004-01-13 | first release |
2004-01-03 | start writing these pages |