Betreten der Baustelle auf eigene Gefahr!

Sysops haften für ihre User ;-)
11.  Optoelektronik und Displays


11.1 LC-Displays mit Hitachi 44780 Controller-IC (auch LTN2119)

Der HD44780 LCD-Controller besitzt ein 128 bytes großes Display RAM.
Je nach Modultyp (8-40 Zeichen je Zeile / 1-4 Zeilen) ist die Zuordnung
von Anzeigen-Zeile/Spalte zu Speicherstelle im Displayram unterschiedlich:

                 16x1 Modul   20x1 Modul   40x1 Modul
Zeile 1 steht in     *        00h - 13h

                 16x2 Modul   20x2 Modul   40x2 Modul
Zeile 1 steht in 00h - 0Fh    00h - 13h    00h - 27h
Zeile 2 steht in 40h - 4Fh    C0h - D3h    40h - 67h

                 16x4 Modul   20x4 Modul
Zeile 1 steht in 00h - 0Fh    00h - 13h
Zeile 2 steht in 40h - 4Fh    40h - 53h
Zeile 3 steht in 10h - 1Fh    14h - 27h
Zeile 4 steht in 50h - 5fh    54h - 67h

* Bei dem 16x1 Modul ist die Adressierung etwas komplizierter. Für den HD44780
  LCD-Controller erscheint dieses Modul wie ein 8x2 Modul. Er teilt also die
  tatsächlich vorhandene Zeile in 2 Zeilen. In diesem speziellen Fall liegen
  sie jedoch nicht untereinander, sondern nebeneinander. Die "erste Zeile"
  enthält die Zeichen 1-8, während die "zweite Zeile" die Zeichen 9-16 enthält.
  Zeile 1 steht in 00h - 07h
  Zeile 2 steht in 40h - 47h

Anschlußbelegung der LCD modul und des Controller-ICs:

ACHTUNG! Für die LCD-modul ist es überlebenswichtig die
         Versorgungsspg. korrekt anzulegen. Darum bitte
         grundsätzlich die Anschlußbelegung gründlich
         überprüfen!

 LCD     IC
Modul HD44780
 PIN    PIN   Symbol Funktion
  1      23    GND  -   0V
  2      33    VCC  -  +5V
  3      --    Vee  -  LCD-Kontrastspg.(ca. 0,5V)
  4      36    RS   -  Register select, 0/1 = Instruction/Data
  5      37    R/W  -  Read/Write,      0/1 = Write/Read
  6      38    E    -  Enable
  7      39    D0   -   D  LSB
  8      40    D1   -   a   :
  9      41    D2   -   t   :
 10      42    D3   -   e   :
 11      43    D4   -   n   :
 12      44    D5   -   b   :
 13      45    D6   -   u   :
 14      46    D7   -   s  MSB

    666665555555555444444444
    432109876543210987654321
  +-------------------------+
65|                         |40
66|                         |39 Der Kontrast des LC-Displays
67|                         |38 kann mit einem 10K-20K Ohm Poti
68|                         |37 wie folgt eingestellt werden:
69|                         |36
70|                         |35         +---- Vcc
71|                         |34         |
72|                         |33         -
73|      HD44780 TOP        |32        | |
74|                         |31    Poti| |<-- Vee
75|                         |30        | |
76|                         |29         -
77|                         |28         |
78|                         |27         +---- GND
79|                         |26
80\                         |25
   \------------------------+
    000000000111111111122222
    123456789012345678901234
    

11.2 Befehlssatz des HD44780 LCD-Controllers:

R|
/|R| Data    Execution
W|S|76543210 time
-+-+-------- ----------- Command from CPU to LCD
0|0|00000001 1.64ms      Clear display
0|0|0000001x 40us-1.64ms Home cursor
0|0|000001is 40us        Entry mode set
0|0|00001dcb 40us        On/off control
0|0|0001srxx 40us        Cursor/shift
0|0|001dnfxx 40us        Function set
0|0|01aaaaaa 40us        Character RAM Address Set
0|0|1aaaaaaa 40us        Display RAM Address Set
------------ ----------- Data from CPU to LCD
0|1|dddddddd 40us        Write Data to DD RAM
0|1|dddddddd 120us       Write Data to CG RAM
------------ ----------- Read Operations from LCD to CPU
1|0|baaaaaaa 1 cycle     Read Busy Flag
1|1|zzzzzzzz 40us        Read Data from DD RAM
1|1|zzzzzzzz 120us       Read Data from CG RAM

x=don't care

i:1/0 = increment/decrement DD RAM address by 1
        after each DD RAM write or read.
s:1/0 = display scroll on/off

d:1/0 = display on/off
c:1/0 = cursor on/off
b:1/0 = blink character at cursor position on/off

s:1/0 = scroll display/move cursor.
r:1/0 = right/left.

d:1/0 = 8/4-bit interface.
n:1/0 = (1/16)/(1/8 or 1/11) duty (multiplex ratio).
      = 2/1-line Display
f:1/0 = 5x11/5x8 dots.

a:    = Address

d:    = Data to CG or DD RAM

b:1/0 = Display Busy/Ready
a:    = Current (DD/CG) RAM address counter

z:    = Data from CG or DD RAM


11.3 Weiterführende Informationen

Elektor 10/1995 S.24: "LCD für PC"
Elrad MailBox (0511- 5352401): File LCD.LZH (englisch)