User manual

Code Mercenaries
14
II
II
OO
OO
--
--
WW
WW
aa
aa
rr
rr
rr
rr
ii
ii
oo
oo
rr
rr
55
55
66
66
5.10.2 LCD Special mode function
The LCD special mode function supports a wide
range of alphanumeric and graphic LCD modules.
The LCD function is enabled by sending an output
report with ID 4 to the USB interface 1:
enable = $00 disables the LCD function.
enable = $01 enables the LCD function, other
values are reserved.
"mode" contains a number of bits that determine
the behaviour of the LCD interface:
7 - Disable Pull Ups (1 = disable)
6 - unused, zero
5 - unused, zero
4 - LC7981
3 - T6963
2 - No44780Busy
1 - Reset
0 - Dual44780
"Dual44780" enables the second E signal to control
modules with two HD44780 controllers on them.
"No44780Busy" must be set for controllers that
don't have the busy flag in bit 7 of register 0 like
the HD44780 or KS0108 controllers. Setting this
flag does disable checking for the busy flag in bit 7
of the LCD register 0.
"Reset" enables the /RES pin. Upon issuing the
enable report with this bit set the LCD function
will pull the /RES pin low for approximately 2sec
before it is released to high again.
"T6963" switches to a mode compatible with the
T6963C controllers. Make sure to also set the
"No44780Busy" bit. The T6963 specific busy flags
are checked in this mode. The T6963C is the only
controller for which IOW56 implements the 8080
bus protocol.
"LC7981" switches to a mode compatible with the
LC7981 and HD61830 controllers. Make sure to
also set the "No44780Busy" bit. The LC7981
specific busy flag is checked in this mode.
Upon enabling the LCD function the Pins are put
under control of the LCD function and can no
longer be controlled by interface 0.
The /On pin is pulled low when the LCD function
is enabled, it will go high when the IO-Warrior56
enters suspend state.
To write data to the connected LCD module an
output report with ReportID 5 is written with the
following format:
"flags" contains the following bits:
7 - RS, Register Select bit
6 - Select Special
5 - data count MSB
4 - data count
3 - data count
2 - data count
1 - data count
0 - data count LSB
The status of the "RS" bit is used to set the RS or
A0 line to the LCD module.
With "data count" the number of bytes to be
written is specified. IO-Warrior56 will write up to
62 data bytes to the register specified by the "RS"
bit. If the "No44780Busy" flag has not been set the
Busy bit of the LCD module is automatically
checked and data written only when the LCD
module is ready to accept it.
When in "Dual44780" mode the "Select Special"
bit selects which of the E lines is used for this
request. "Select Special" = 0 uses E1, "Select
Special" = 1 uses E2.
In T6963 mode the "Select Special" bit selects if
the normal busy flag or the auto mode busy flag
should be checked. "Select Special" = 0 checks
STA0, 1 before writing to the LCD, "Select
Special" = 1 checks STA3.
ReportID
$05 out
12
flags data
34
data data
... 62
data data
63
data
V 1.0.3, November 6nd 2012 for chip version V1.1.0.1