Using Lcd Port As Digital I/O; Lcd Interface - Technologic Systems TS-3200 User Manual

Table of Contents

Advertisement

TS-3200 User's Manual

6.3 Using LCD Port as Digital I/O

The LCD Port can be used as 11 additional digital I/O lines or it can be used to interface to a standard
alphanumeric LCD display. At system reset, the port defaults to DIO mode. If using an LCD display this
port can be switched to LCD mode by writing a 1 into bit 4 at I/O location 7Dh, or the BIOS c all to
enable the LCD also sets bit 4 at I/O location 7Dh (See Section 7 for LCD mode).
When the LCD port is in DIO mode, pins 3 and 6 are digital inputs, pin 5 is a digital output, and pins 7 –
14 are programmable as either inputs or outputs.
LCD_6
14
13
LCD_7
LCD_4
12
11
LCD_5
LCD_2
10
9
LCD_3
LCD_0
8
7
LCD_1
6
5
WR
EN
4
3
Bias
RS
2
1
GND
5V
Figure 4 – Pinout for LCD header
when used as DIO
All digital outputs on this port can source or sink 4 mA and the digital inputs have standard TTL level
thresholds and must not be driven below 0 Volts or above 5.0 Volts.

7 LCD Interface

A 14-pin LCD connector is provided on the TS-3200 for interfacing with standard alphanumeric LCD
displays. These displays use a common controller, the Hitachi HD44780 or equivalent. While software
written for the HD44780 will work with all displays using the controller, the cable needed is dependent
on the display used. For most displays, a straight-through type ribbon cable can be used. The
connector on the LCD display is typically mounted on the backside of the display. Warning – using an
incorrect cable or mounting the LCD connector on the front-side can result in a reverse power polarity
and can damage the LCD display. Please refer to your LCD data sheets for in-depth information.
The TS-3200 BIOS incorporates a fairly complete set of INT10h video routines that work with the LCD.
Once the LCD has been enabled (INT15h/Func B042h – see Appendix D ) , the LCD can be written to
Pin
Function
1
LCD 5V
2
LCD GND
3
RS
Register Select (A0)
4
Bias
680 Ohm to GND
5
EN
LCD Enable (Active High)
6
WR#
Write (Active Low)
7
LCD_1
8
LCD_0
9
LCD_3
10
LCD_2
LCD0 – LCD7: Buffered
11
LCD_5
bi-directional data bus
12
LCD_4
13
LCD_7
14
LCD_6
Table 1 - LCD Header Signals
Pins 3 (RS) and 6 (WR) can be read at I/O location 73h bits 7 and 6,
respectively. Pin 5 (EN) is controlled by writing to I/O location 73h bit
0.
Pins 7 –14 can be read or written at I/O location 72h. The direction of
the byte-wide port (pins 7 – 14) at I/O location 72h is controlled by
bits 2 and 3 at I/O location 7Dh. If bit 2 is a zero, then the lower 4
bits (pins 7 – 10) are inputs. If bit 2 is logic 1, then pins 7 – 10 are
outputs. Bit 3 at location 7Dh controls the upper 4 bits, pins 11 – 14
in a like manner.
Comments
11
using the standard BIOS routines. This includes the
majority of PC languages, such as C and C++. See
the programs included on the utility disk for
examples.
I/O addresses
72h and 73h are
Figure 5 - LCD Header Pinout
used to access
the LCD. Figure
5 shows the header pin-out, while Table 2 lists the
LCD signals. The section below will briefly describe
the LCD interface signals.
The RS signal is simply the buffered A0 address
line. Thus, reads and writes to 72h cause register
select to be low, and those to 73h cause it to be
high. Generally the LCD uses this line to separate
data bytes from command bytes. See your LCD
data sheet for details.
The WR# signal is an active low write enable line.
Technologic Systems
2
4
6
8 10 12 14
1
3
5
7
9 11 13
05/21/2009

Advertisement

Table of Contents
loading

Table of Contents