# Define the clock type and the active edge
@clock source internal
@clock pll enable
@clock output disable
@clock outputratio 1
@clock type continuous
@clock polarity positive
@clock sample rising
# Define the trigger type and pattern
@trigger type internal
@trigger ctrl 0x00 0x00
# ----------------
# Begin of control section
#
@ctrl_begin
# E
# |
# pin 543210
@header ---O
@loop 1 3
@ctrl 000000
@ctrl 000001
@loop 1 3
@ctrl 000000
@ctrl_end
#
# End of control section
# ----------------
# ----------------
# Begin of data section
#
@data_begin
# RS
# |
# |BL
# ||
# ||
# pin FEDCBA9876543210
@header -----OOOOOO
# LCD INIT BEGINS
# send 0x03 3 times
@loop 1 3
@data out 0000000000000011
# send 0x02
@data out 0000000000000010
# send init string
# send 0x28
@data out 0000000000000010
@data out 0000000000001000
# send 0x08
@data out 0000000000000000
@data out 0000000000001000
# send 0x01
@data out 0000000000000000
@data out 0000000000000001
# send 0x06
@data out 0000000000000000
@data out 0000000000000110
# send 0x0E
@data out 0000000000000000
@data out 0000000000001110
# LCD INIT ENDS
Listing 2—The LCD Enable
(E) pin must be toggled low-high-low with every 4 bits of data or command that’s
sent to the LCD’s HD44780 chipset. So, it’s only logical to assign the LCD E pin
to a GP-22050 control pin. On the other hand (as Randy Travis would say), it’s
more prudent to assign the LCD RS signal and the LCD backlight control to standard
data pins just as you and I would do with a microcontroller.