hw-visual-lcd (none :: hw-visual-display)


Simulates a dot matrix LCD display, using Tcl/Tk to manage the graphics window



The LCD display model is somewhat abstracted from the physical device:


The window geometry is specified in SCREEN pixels via the width and depth attributes. Each pixel in the simulated display occupies a box of bits-per-pixel by bits-per-pixel screen pixels. bits-per-pixel is also a settable attribute, and defaults to a 4X4 box. Thus, the number of simulated rows is depth/bits-per-pixel; and the number of simulated columns is width/bits-per-pixel.

While "on" pixels are currently always drawn as black, the background color of the simulated display can be specified using the standard Tcl/Tk color specification syntax (eg. #6fa700 or white). This color is specified with the background-color attribute.


See discussion of the FR and row-col pins in Modeling section above

SID Conventions
functional supported -
save/restorenot supported -
triggerpointsnot supported -


Related components

The LCD display is typically connected to a controller via the tk-bridge. The following configuration file segment shows how the HD44780U LCD controller can be connected to the hw-visual-lcd display:

      new hw-lcd-hd44780u-a00 lcd	# Standard Japanese font
      new hw-visual-lcd display		# instantiate the display
      # display size is in pixels - ie. font-width*display-height
      set display width 40		# 8 chars X 5 pixels per char
      set display height 8		# single line of 8 pixels

      # connect the LCD to the display
      connect-pin lcd row-col -> display row-col
      connect-pin lcd FR -> display FR


Component Reference:

Component: hw-visual-lcd

row-colin2 shorts as a 32-bit valuedisplay

namecategorylegal valuesdefault valuebehaviors
widthsettingany positive value20*8*4 = 480configuration
heightdisplayany positive value4*8*4 = 128configuration
bits-per-pixelsettingany positive value4configuration
background-colorsettingany legal tk color specifier-