1 hw-lcd-char-display (liblcd-char-display.la ::
2 lcd_char_display_component_library)
6 Simulates a dot matrix LCD display, using curses (a cursor control
7 library) to manage the graphics inside a text window.
9 ----------------------------------------------------------------------
15 The LCD display model is somewhat abstracted from the physical device:
17 * A real display typically has separate row and column pins that are
18 cycled to select each pixel in the display. These are replaced by 2
19 pins in the model. The FR (frame) pin is driven to 1 to identify that
20 a new frame is starting, and driven to 0 when the frame is finished.
21 The row-col pin incorporates all the functionality of the row and
22 column drivers on the real chip. This pin is driven once for each "on"
23 pixel in the display, and the value on the pin is the [X,Y]
24 co-ordinates of the pixel, encoded as two adjacent 16-bit values in
27 With these two pins, a display refresh cycle starts when the FR pin is
28 asserted; the [X,Y] co-ordinates of all the "on" pixels are then
29 transmitted on the row-col pin; and the FR pin is de-asserted to end
32 * The physical device must be refreshed periodically, but the model
33 retains its last written values indefinitely.
35 +-------------------------------------------------+
37 |-------------------------------------------------|
38 | configuration | The width and height attributes |
39 | | set the display size in units |
40 | | of characters. For example, the |
41 | | default values are 80 and 24 |
42 | | for width and height, |
43 | | respectively. This is the size |
44 | | of a standard CRT window. |
45 |---------------+---------------------------------|
46 | display | See discussion of the FR and |
47 | | row-col pins in Modeling |
49 +-------------------------------------------------+
51 +-------------------------------------------------+
53 |-------------------------------------------------|
54 | functional | supported | This is a functional |
55 | component | | component. |
56 |--------------+-----------+----------------------|
57 | Save/restore | supported | Save/restore is |
59 |--------------+-----------+----------------------|
60 | Triggerpoint | supported | Triggerpoint support |
61 | | | is available on all |
62 | | | three input pins. |
63 +-------------------------------------------------+
65 ----------------------------------------------------------------------
71 The LCD display is typically connected to an LCD controller. The following
72 configuration file segment shows how the hw-lcd-hd44780u LCD controller
73 can be connected to the display:
75 new hw-lcd-hd44780u-a00 lcd # Standard Japanese font
76 new hw-lcd-char-display display
78 # display size is in pixels - ie. font-width*display-height
79 set display width 40 # 8 chars X 5 pixels per char
80 set display height 8 # single line of 8 pixels
82 # connect the LCD to the display
83 connect-pin lcd row-col -> display row-col
84 connect-pin lcd FR -> display FR
86 ----------------------------------------------------------------------
90 Component: hw-lcd-char-display
92 +-------------------------------------------------+
94 |-------------------------------------------------|
95 | name | direction | legalvalues | behaviors |
96 |---------+-----------+---------------+-----------|
97 | FR | in | binary | display |
98 |---------+-----------+---------------+-----------|
99 | row-col | in | 2 shorts as a | display |
100 | | | 32-bit value | |
101 +-------------------------------------------------+
103 +----------------------------------------------------+
105 |----------------------------------------------------|
106 | name | category | legal |default| behaviors ||
107 | | | values | value | ||
108 |------+-------------+--------+-------+-------------||
110 |width |configuration|positive|80 |configuration||
112 |------+-------------+--------+-------+-------------||
114 |height|configuration|positive|24 |configuration||
116 +----------------------------------------------------+