2 <!DOCTYPE defcomplib SYSTEM "http://sources.redhat.com/sid/component.dtd">
4 <defcomplib lib="liblcd-char-display.la" dlsym="lcd_char_display_component_library">
5 <defcomponent name="hw-lcd-char-display">
6 <defpin name="FR" direction="in" legalvalues="binary" behaviors="display"/>
7 <defpin name="row-col" direction="in" legalvalues="2 shorts as a 32-bit value" behaviors="display"/>
8 <defattribute name="width" category="configuration" legalvalues="any positive value" defaultvalue="80" behaviors="configuration"/>
9 <defattribute name="height" category="configuration" legalvalues="any positive value" defaultvalue="24" behaviors="configuration"/>
13 Simulates a dot matrix LCD display, using curses (a cursor control library)
14 to manage the graphics inside a text window.</p>
20 The LCD display model is somewhat abstracted from the physical device:</p>
24 A real display typically has separate row and column pins that are cycled
25 to select each pixel in the display. These are replaced by 2 pins
27 <pin>FR</pin> (frame) pin is driven to 1 to identify that a new
28 frame is starting, and driven to 0 when the frame is finished. The
29 <pin>row-col</pin> pin incorporates all the functionality of the row and column
30 drivers on the real chip. This pin is driven once for each "on" pixel
31 in the display, and the value on the pin is the [X,Y] co-ordinates of
32 the pixel, encoded as two adjacent 16-bit values in the 32-bit pin value.</p>
34 With these two pins, a display refresh cycle starts when the FR pin is
35 asserted; the [X,Y] co-ordinates of all the "on" pixels are then
37 <pin>row-col</pin> pin; and the
38 <pin>FR</pin> pin is de-asserted to end
39 the refresh cycle.</p></li>
42 The physical device must be refreshed periodically, but the model retains
43 its last written values indefinitely.</p></li></ul></p>
45 <behavior name="configuration">
47 The width and height attributes set the display size in units of
48 characters. For example, the default values are 80 and 24 for width
49 and height, respectively. This is the size of a standard CRT window.</p>
51 <behavior name="display">
55 <pin>row-col</pin> pins in Modeling section above.</p>
57 <convention name="functional component" supported="true">
59 This is a functional component.</p>
61 <convention name="Save/restore" supported="true">
63 Save/restore is supported.</p>
65 <convention name="Triggerpoint" supported="true">
67 Triggerpoint support is available on all three input pins.</p>
72 <title>Related components</title>
74 The LCD display is typically connected to an LCD controller.
75 The following configuration file segment shows how the
76 <complib>hw-lcd-hd44780u</complib> LCD
77 controller can be connected to the display:</p>
79 <code> new hw-lcd-hd44780u-a00 lcd # Standard Japanese font
80 new hw-lcd-char-display display
82 # display size is in pixels - ie. font-width*display-height
83 set display width 40 # 8 chars X 5 pixels per char
84 set display height 8 # single line of 8 pixels
86 # connect the LCD to the display
87 connect-pin lcd row-col -> display row-col
88 connect-pin lcd FR -> display FR</code></p>