Hades logo    Hades applet banner

TAMS / Java / Hades / applets (print version): contents | previous | next

Alphanumeric LCD

Alphanumeric LCD  screenshot

Description

A demonstration of a standard alphanumerical (text-mode) liquid-crystal display. Usually, both the actual liquid-crystal display and the required controller are integrated on one circuit-board. Most controller ICs provide the same basic instruction set shown in this applet, while additional functions like downloadable character-sets may be controller-specific. The TextLCD simulation component (hades.models.special.TextLCD) is based on the RS components datasheet "alphanumeric dot matrix liquid crystal displays", F19357, 1995.

The TextLCD component uses an external window for its display; this window opens automatically when the component is first loaded. Click on the TextLCD symbol to show or hide this external window during a simulation:

TextLCD screenshot

The applet includes a StimuliGenerator component that drives the input lines during the first few seconds of the simulation. The input stimuli first initialize the TextLCD component (initialize, display on, cursor on, etc.), and then write the short "Hello, world!" message to the TextLCD. Once the animation is finished, you can click the input switches (or type the 'e', 'r', 'w', '0'..'7' bindkeys) to control the TextLCD.

The following image shows the character matrix of the TextLCD component as a bitmap:

character set

Every command is triggered by a short 0-1-0 pulse of the E (enable) input. The command encoding is based on the two command inputs, namely RW (read/not write) and RS (data/not command):

 RW  RS
  0   0   write command
  0   1   write data
  1   0   read command
  1   0   read data
Data transfers are 8-bit wide by default, but a special 4-bit mode exists where each command or character is transferred in two packets of 4-bits each. (The 4-bit mode is still fast enough for most applications, and requires less pins and wires than the 8-bit mode. The upper data bits D7..D4 are used, and the most significant nibble of commands and data is sent first.)

Command summary:

 RR data data  command:
 SW 7654 3210  

 00 0000 0001  clear display
 00 0000 001*  cursor home
 00 0000 01IS  entry mode (I:incr /I:decr S:shift /S: move)
 00 0000 1DCB  display (D: display on/off C: cursor on/off B: underline off/on)
 00 0001 SR**  shift move (S: rotate /S: shift R: right /R: left)
 00 001D NF**  set function (D: 8bit /D: 4bit N: two lines F: select font)
 00 0011 ****  same command twice: reset

 00 01AA AAAA  set character generator address
 00 1AAA AAAA  sets data address

 01 BAAA AAAA  read busy flag

 10 DDDD DDDD  write character data
 11 DDDD DDDD  read character data

Click here to see the input stimuli used for the animation. The following image shows the waveform traces for the "Hello, world!" example (the traces show a slowed-down version of the actual stimuli, to better show the data transfers):

waveforms

Run the applet | Run the editor (via Webstart)


Impressum | 24.11.06
http://tams.informatik.uni-hamburg.de/applets/hades/webdemos/45-misc/50-displays/text-lcd_print.html