27963 Parallax Inc, 27963 Datasheet - Page 14

SOLUTIONS CUBED: MEMKEY

27963

Manufacturer Part Number
27963
Description
SOLUTIONS CUBED: MEMKEY
Manufacturer
Parallax Inc
Datasheet

Specifications of 27963

Accessory Type
Keypad Encoder
Product
Microcontroller Accessories
For Use With/related Products
BASIC Stamp®
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Miniature Engineering Modules – MEMKey
AN-301 Interfacing to a PC serial port
obstacle is to convert from the TTL level true data format of the MEMKey to the RS-232 level inverted data of the PC
serial port. The easiest way to do this is with a level conversion chip, such as those produced by Maxim, Linear
Technologies, and others. The diagram above shows a circuit to do the level conversion.
work with most computers, you should verify this for your PC.
automatic mode, and then queries the MEMKey for key presses. A complete menu-driven Q-BASIC program which
demonstrates all of the MEMKey commands can be downloaded from the Solutions Cubed web site (www.solutions-
cubed.com).
AN-301 Interfacing to a PC serial port code listing
OPEN "COM1:2400,N,8,1,CD0,CS0,DS0,OP0,TB2048,RB2048" FOR RANDOM AS #1
'Reset MEMKey to Default Values...
'Provide delay for write to EEPROM
'Disable Typematic and auto-return of keys
'Determine Function
Determine:
'Read The Key Buffer
ReadKeyBuffer:
SOLUTIONS CUBED
530-891-8045
Signal Name
TX
RX
GND
SERIAL
PORT
FOR i = 1 TO 100000: NEXT
FOR i = 1 TO 100000: NEXT
Serial Port Level Conversion
The MEMKey can be interfaced to a PC serial port with a minimum of effort and difficulty. Perhaps the biggest
For a standard PC serial port use the following pin out for the serial connector. While these connections should
Serial Port Pin Outs
A short Q-BASIC program is provided below which resets the MEMKey to its default state, turns off typematic and
CLS
PRINT #1, CHR$(17);
PRINT "The Default Reset Command Has Been Sent...": PRINT
PRINT #1, CHR$(14) + CHR$(0);
PRINT "Typematic And Auto-Return have been disabled...": PRINT
INPUT "Read the key buffer [R] or program a key value [P] or Quit [Q]"; Funct$
GOTO Determine
PRINT #1, CHR$(0);
PRINT : PRINT "The Key Buffer Reads: ";
FOR delay = 1 TO 20000: NEXT
GND
IF Funct$ = "R" OR Funct$ = "r" THEN GOTO ReadKeyBuffer
IF Funct$ = "P" OR Funct$ = "p" THEN GOTO RetryProgram
IF Funct$ = "Q" OR Funct$ = "q" THEN GOTO ExitProgram
RX
TX
12
17
5
4
6
9
MAX203
T1OUT
R1IN
V-
V-
GND
GND
R1OUT
DB-25
2
3
7
VCC
T1IN
C2+
C2+
C2-
C2-
7
2
3
11
15
16
10
+5V
'Send Default Reset Command
MEMKey
VDD
TM
FM
GND
'Program Config Byte
'Provide delay for write to EEPROM
'Read Key Buffer
'Allow data to be received
K0
K1
K2
K3
K4
K5
K6
K7
DB-9
3
2
5
Grayhill 96BB
Row0
Row1
Row2
Row3
Col0
Col1
Col2
Col3
13

Related parts for 27963