Hi i was trying to use 4x4 keypad connected to memkey and to basic stamp II.
I used your an300 and an302 codes as well as memkey.2sx with some errors it gave wrong values 4x4 keypad connections are correct rows and colums.
is there a ready code that will enable me to program wrong keys on in the debug screen?
Page 1 of 1
Problem configuring memkey
#2
Posted 27 June 2006 - 11:09 AM
I'm afraid I don't quite understand the question. You want code that will give you incorrect key values? Or are you getting incorrect key values and wondering why?
#3
Posted 14 February 2010 - 05:13 PM
Hello Lon,
I have the same problem, the character readings are really absurd. I didn't even write any driver for myself, just the examples around.
Right now i am testing the memkey with this code;
With this program, when i press 1 on the keypad, i got nothing in the debug window.
2 gives me sometimes "C" sometimes "E" (definitely something is wrong here??)
3 => 30
A=> 3E
4=> C0
and so on. These values are far away from the default values i should get.
I connected the keypad(8 pins 4x4 greyhill 96 series) to the first K0 to K7 pins of the memkey. Maybe i should connect the pins different? or do you suspect from a device malfunction?
Thanks for you attention, have a nice day!!
I have the same problem, the character readings are really absurd. I didn't even write any driver for myself, just the examples around.
Right now i am testing the memkey with this code;
' {$STAMP BS2sx}
' {$PBASIC 2.5}
INPUT 0
OUTPUT 1
INPUT 2
TM CON 0 ' To Master
FM CON 1 ' From Master
KEY CON 2
MEMBaud CON 396
Default CON $11
SEROUT FM, MEMBaud, [Default]
DEBUG "Press a key",CR
Read_Key_Found_Loop:
SEROUT FM, MEMBaud,[$01]
SERIN TM, MEMBaud,[B0]
IF B0 = 0 THEN Read_Key_Found_Loop
SEROUT FM, MEMBaud,[$00]
SERIN TM, MEMBaud,[B0]
DEBUG "Key pressed is", HEX B0, CRWith this program, when i press 1 on the keypad, i got nothing in the debug window.
2 gives me sometimes "C" sometimes "E" (definitely something is wrong here??)
3 => 30
A=> 3E
4=> C0
and so on. These values are far away from the default values i should get.
I connected the keypad(8 pins 4x4 greyhill 96 series) to the first K0 to K7 pins of the memkey. Maybe i should connect the pins different? or do you suspect from a device malfunction?
Thanks for you attention, have a nice day!!
#4
Posted 14 February 2010 - 08:36 PM
The baud rate constant for the BS2 is different than the constant used in the BS2SX. You should review the Parallax manual, but I believe the constant for the BS2SX would be 1021 not 396. Try that and see if you have better luck.
Lon
Lon
Share this topic:
Page 1 of 1

Help










