27963 Parallax Inc, 27963 Datasheet - Page 12

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
APPLICATIONS
configurations. These examples should make it fairly easy for an end user to custom design their own programs and
uses for the MEMKey.
‘Interfacing with a single wire’, are all included here.
AN-300 Interfacing to a Parallax Basic Stamp II
reason: ease of developing code. The SERIN and SEROUT commands which the BASIC Stamp interpreter supports,
provide the end user with an effective and simple method to interface to the MEMKey. The diagram below shows the
connection diagram used for this application.
AN-300 Interfacing to a BSII code listing
input 15
output 14
input 13
'
BEGIN:
'
HIGH 14
PAUSE 1000
SEROUT 14,396,[$02,$F0,$0F]
PAUSE 10
SEROUT 14,396,[$03]
SERIN 15,396,[b0,b1]
DEBUG "delay is: ",dec b0, cr, "rate is: ",dec b1,cr,cr
'
SEROUT 14,396,[$04,$10]
PAUSE 10
SEROUT 14,396,[$05]
SERIN 15,396,[b0]
DEBUG "debounce is: ",dec b0,cr,cr
'
SEROUT 14,396,[$08,$18,$AA]
PAUSE 10
SEROUT 14,396,[$09,$18]
SERIN 15,396,[b0]
DEBUG "EEPROM value is: ",dec b0,cr,cr
'
SEROUT 14,396,[$0A,$00,$40]
PAUSE 10
SEROUT 14,396,[$0A,$01,$41]
PAUSE 10
SEROUT 14,396,[$0A,$02,$42]
PAUSE 10
SEROUT 14,396,[$0A,$03,$43]
PAUSE 10
SEROUT 14,396,[$0A,$04,$44]
PAUSE 10
SOLUTIONS CUBED
530-891-8045
BSII
P15
P14
P13
VDD
GND
The following examples show how to interface the MEMKey to various master processors in various
AN-300 ‘Interfacing to a Parallax BASIC Stamp II’, AN-301 ‘Interfacing to a PC serial port’, and AN-302
The Parallax BASIC Stamp II makes an ideal choice for the master processor for the MEMKey for one main
MEMKey
VDD
GND
TM
FM
KEY
K0
K1
K2
K3
K4
K5
K6
K7
Grayhill 96BB
Row0
Row1
Row2
Row3
Col0
Col1
Col2
Col3
'TM
'FM
'KEY
'let noise settle
'program typematic: delay = 600mS, rate = 37.5mS
'allow EEPROM to write
'read typematic
'program debounce: time = 40mS
'allow EEPROM to write
'read debounce
'program user EEPROM address $18 with $AA
'allow EEPROM to write
'read user EEPROM to ensure wrote correctly
'program serial key 0 to return $40
'allow EEPROM to write
'program serial key 1 to return $41
'allow EEPROM to write
'program serial key 2 to return $42
'allow EEPROM to write
'program serial key 3 to return $43
'allow EEPROM to write
'program serial key 4 to return $44
'allow EEPROM to write
The MEMKey’s KEY pin is attached to the Basic Stamp II so
that the BSII can tell when a key is pressed. The program
below simply sets up the programmable aspects of the
MEMKey, sets it up for poll mode and then scans for keys.
The in-line comments should make it easy to understand.
11

Related parts for 27963