beautypg.com

6 trying out a keypad – Matrix Orbital LK202-25 Legacy User Manual

Page 6

background image

LK202-25 rev 3

6

Character

Hex value

Function

CR

0x0D

Moves cursor to beginning of the current line.

LF

0x0A

Moves cursor to the beginning of the next (or previous) line.

FF

0x0C

Clears the display and puts the cursor at the top left

BS

0x08

Moves the cursor one position to the left and clears that position.

Note: These command characters are not guaranteed to work on other Matrix Orbital display
modules. If you want your code to be portable, use the appropriate commands listed later in the
manual instead.

If you want to exercise some of the other features of the LK202-25 you'll need to write a program (in any
convenient language such as Basic or C) to issue the required command strings. Most terminal programs
are unable to issue the 0xFE character needed as a command prefix. You probably won't need to do this at
the initial testing stage.

If you've reached this point and operation is normal, you can be confident that your LK202-25 works
properly.

1.6 Trying out a Keypad

Since a number of different keypad types can be connected to the LK202-25, the results you get may be a
little unpredictable. At this point all we need to do is make sure that your keypad and interface work, and
possibly generate an ASCII map for your programming needs.

The keypad interface on the LK202-25 converts a row/column connection to an ASCII character. By
default, a keypress is transmitted as serial data immediately. Keypad buffering can be selected using the
appropriate commands.

1.6.1 Here's what to do:

1. Your PC should be running a terminal program, such as Hyperterm (as in the previous section).

2. With the LK202-25 connected to the PC, plug in your keypad. If your connector has fewer pins than

the one on the LK202-25, center it as well as possible.

Note 1: The keypad connector must be wired with columns on one side and rows on the other side of
the center of the connector. If your keypad isn't wired this way you will need to make an adapter or
rewire the connector to meet this requirement.

Note 2: The connector is reversible. Reversing the connector will not damage the keypad or the
LK202-25, but it will change the ASCII character map.

3. Press a key on the keypad. An upper case ASCII character (A-Y) should appear on the PC screen.

Different keys should generate different characters.

If you want to experiment, reverse the connector and see if it generates a more logical set of characters.
Ultimately, the program in your controller will have to "map" these characters to the ones marked on the
keypad, which will likely be different.