hw-lcd-hd44780u (libhd44780u.la :: hd44780u_component_library)

Synopsis:

Simulates the Hitachi HD44780U LCD controller. The controller supports 1 or 2 lines of 8 5X8 dots with cursor, or 1 line of 8 5X10 dots with cursor. The chip includes an 80 character display RAM, a 64 byte character generator RAM, and a 240 character ROM of predefined fonts. Two ROMS are available: hw-lcd-hd44780u-a00 specifies the Japanese standard font; hw-lcd-hd44780u-a02 is the European standard font.


Functionality:

Modelling:

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

Behaviors
configuration

The refresh-period-msec attribute is used specify the refresh period (in milliseconds) for continuous update modes such as blink.

debug

The boolean verbose? attribute can be used to track internal operations

display

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

SID Conventions
functional supported

This is a functional component.

Save/restore supported

Save/restore is supported via the state-snapshot attribute

Triggerpoint supported

Trigger point support is available on the IR, DR, and AC registers.


Environment:

Related components

Besides the CPU bus, the LCD controller is typically connected to a display of some kind. Clearly, the display component must be aware of the refresh protocol used by the HD44780U model. As well, the scheduler is typically used to set up the time between refreshes of the display.

The following configuration file segment shows how the LCD controller can be connected to the lcd.tcl display and host-time scheduler:

      new hw-lcd-hd44780u-a00 lcd	# Standard Japanese font
      new hw-visual-lcd display		# The display is implemented in Tcl
      new sid-sched-host sched		# Use the real-time scheduler
      
      # scheduling (must appear before pin assignments)
      set sched num-clients 1
      set sched 0-regular? 1
      set sched 0-time 500		# in msec

      # 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 scheduler
      connect-pin sched 0-event -> lcd refresh-sync-event
      connect-pin sched 0-control <- lcd refresh-sync-control
      # connect the LCD to the display
      connect-pin lcd row-col -> display row-col
      connect-pin lcd FR -> display FR


Component Reference:

Component: hw-lcd-hd44780u (Abstract)

pins
namedirectionlegalvaluesbehaviors
FRoutbinarydisplay
row-colout2 shorts as a 32-bit valuedisplay

buses
nameaddressesaccessesbehaviors
bus0..1byte-wide access

attributes
namecategorylegal valuesdefault valuebehaviors
refresh-period-msecsettingany positive value500configuration
verbose?settingbooleanfalsedebug

Variant: hw-lcd-hd44780u-a00

Same as hw-lcd-hd44780u

Variant: hw-lcd-hd44780u-a02

Same as hw-lcd-hd44780u


References:

HD44780U (LCD-II) Dot Matrix Liquid Crystal Display Controller Driver (from the Hitachi web site)