Matrix Keypad Support - Technologic Systems TS-5400 User Manual

Table of Contents

Advertisement

TS-5400 User's Manual
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.
Pin
Function
1
LCD 5V
2
LCD GND
Register Select
3
LCD_RS
(Buffered A0)
4
Bias
680 Ohm to GND
5
LCD_EN
Active high Enable
6
LCD_WR#
Active low Write
7
LCD_D1
8
LCD_D0
9
LCD_D3
10
LCD_D2
D0 – D7: Buffered
11
bi-directional data bus
LCD_D5
12
LCD_D4
13
LCD_D7
14
LCD_D6
Table 3 - LCD Header Signals
LCD Enable is an active high signal, raised whenever the LCD addresses are being read or written.
D0 – D7 are bi-directional, buffered copies of the data bus and carry all data and commands to the LCD.
Table 3 is not the standard pin-outs given for LCD displays. But this pin-out allows a standard ribbon
cable to be used when the ribbon cable is attached to the backside of the LCD.
Example LCD code is available at:

8 Matrix Keypad Support

The DIO2 port, signals DIO2_0 through DIO2_7, may be configured to support a 4 x 4 matrix keypad.
When enabled, BIOS firmware performs all the work, making the matrix keypad appear as a simple 16-
key keyboard to software. This allows the use of standard keyboard access routines. The default set of
keys translated by the BIOS consists of 0 – 9, A – D, *, and #. The # key is returned as an ASCII
Carriage Return character (Hex 0D). Because the user is writing the software, this set of keys is usually
sufficient. However, a custom translation table can be loaded, allowing the use of function keys, arrow
keys, or any other key on the keyboard.
Matrix keypad support is enabled or disabled using INT15h, Function B040h (see Appendix F). Once
enabled, standard keyboard BIOS functions are enabled. Note that console redirection and the matrix
keypad support are mutually exclusive – console redirection must be disabled to use the keypad.
A matrix keypad can be used with console redirection only if the keypad is not used as stdin, but
accessed as a hardware device. This is useful if one wishes to use console redirection or to use a PC
The TS-5400 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
Comments
Appendix E below)
The LCD can be written
to as the standard I/O
device. This means that
software can be
developed and
debugged using standard I/O calls, and the executable will
work with LCD, VGA video, or redirected COM port. See
the section 16 for more information.
I/O addresses 72h and 73h are used to access the LCD.
Figure 6
LCD signals. The section below will briefly describe the
LCD interface signals. The LCD can be controlled directly
by software at these addresses.
The register select 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 LCD Write# signal is an active low write enable line.
http://www.embeddedx86.com/downloads/util.zip
2
1
Figure 6 - LCD Header Pinout
shows the header pin-out, while Table 3 lists the
11
Technologic Systems
4
6
8
10 12 14
3
5
7
9
11 13
10/31/03

Advertisement

Table of Contents
loading

Table of Contents