
DISPLAY & KEYPAD PORTS BASIC SECTION 11
Page 11-1
Figure 11-1 Keypad and Display Connectors
INTRODUCTION
DISPLAY PORT SECTION 11
Port J4 supports 4 x 20 and 4 x 40 character LC
displays. Eight lines from digital I/ O por t J3 are used to
write to the display. Angle/ contrast adjustment via R7 is
provided as are + 5V and ground. Figure 13-1 on the
next page shows the location of the connector and R7.
Eight I/O lines for the display are shared between J3 and
J4. All port A lines are used for the display.
A number of character displays may be used. Program
examples assume a HD44780 contr oller is used. This
controller is used on Optrex, AND , Stanley, and other
displays. IEEE LC displays have been successfully used.
Some VF displays from Noritake are LCD interface
compatible.
The keypad port at J5 is for a 4 x 4 matrix, 16 position
keypad. The RPBASIC-52 oper ating systems scans and
debounces the keypad e very 100 mSec. A key is
recognized when a row and column connect.
RPBASIC-52 scans and debounces the keypad every 100
mSec. Keypad presses are returned as a number from 1
to 16 using the KEYPAD(0) function. Keypad scanning
is always active and cannot be turned off. Up to 8 key
presses are buffered.
Keypad presses are multi-tasked using ON KEYPAD.
When a key is pressed, the program br anches to the
subroutine.
Keypads from Remote Processing simply plug into J5.
Limit keypad cable length to less than 2 meters (6 feet).
CONNECTING DISPLAYS
The display port supplies all control lines for character
LC displays. Displays purchased from Remote
Processing include a cable. Simply connect the 16 pin
connector to J4 and the other end into the display.
WRITING TO THE DISPLAY
The display port m ust be initialized using 2 command s.
First, port A must be configured as an output using
CONF IG LINE 100. Port B and C may be configured
as inputs or outputs as necessary. When setting the
output status, port A should be set to 255. The
following example sets ports A and B to output and port
C to input.
CONFIG LINE 100,5,255,255,255
Commentaires sur ces manuels