C interface, 4 rs-232 interface, 5 commands – Matrix Orbital GLK24064-25 Legacy User Manual
Page 25
Table 6: Keypad Layout
Columns
1
2
3
4
5
1
T
S
R
Q
P
Rows 2 O N M
L
K
3
J
I
H
G
F
4
E
D
C
B
A
5
Y
X
W
V
U
NOTE The keypad connector must be wired with columns on one side and rows on the
other side of the center of the connector. If the keypad isn’t wired this way an adapter must
be made or the connector must be rewired to meet this requirement.
5.3 I
2
C Interface
The keypad is read by I
2
C master read. In short, this means that a read of the module will always return
the first unread key press. A read is initiated by writing to the module with its base address plus 1, then
clocking the module’s return byte after the module releases the SDA line. Much more detail on this basic
I
2
C function can be found in the I
2
C specification by Phillips. A good reference is also available at;
¢¡£¡¥¤§¦©¨£¨£§¤¢ !¢"¢¨¢#$¤¢£%£&£')(0¨12¢34¢5761¨12¢3¢$£8¢"79@A ¢¡B
The module contains a ten key press buffer so that it can be polled for key presses at an infrequent rate
(every 500 to 1000 mS is typical). All returned key presses indicate the presence or absence of additional
logged key presses by the most significant bit (MSB - bit 7). If the user has pressed two keys since the last
poll of the keypad interface, the first read will return the key code with bit 7 set and the second read will
return the key code with bit 7 clear. The application must take into account this bit to keep up with user key
presses. If there are no keypresses detected, the module will return zero (0x00).
5.4 RS-232 Interface
By default on any press of a key, the module will immediately send out the key code at the selected baud
rate. This behavior can be modified using commands found in the next section.
5.5 Commands
5.5.1 Auto repeat mode on (254 126 [mode])
[mode] = 0x00 gives Resend Key Code mode
[mode] = 0x01 gives Key Down / Key Up code mode
Two Modes of auto repeat are available and are set via the same command.
Matrix Orbital
GLK24064-25
21