Solutions Cubed Technical Support Forum: Problem configuring memkey - Solutions Cubed Technical Support Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Problem configuring memkey

#1 User is offline   daniil 

  • Starting Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 20-June 06

Posted 20 June 2006 - 08:46 AM

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?
0

#2 User is offline   Lon 

  • Advanced Member
  • PipPipPipPipPipPip
  • View blog
  • Group: Root Admin
  • Posts: 640
  • Joined: 03-March 04

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?
0

#3 User is offline   tugrulzure 

  • Starting Member
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 14-February 10

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;

' {$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, CR


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!!
0

#4 User is offline   Lon 

  • Advanced Member
  • PipPipPipPipPipPip
  • View blog
  • Group: Root Admin
  • Posts: 640
  • Joined: 03-March 04

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
0

#5 User is offline   tugrulzure 

  • Starting Member
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 14-February 10

Posted 14 February 2010 - 09:04 PM

Thank you very much Lon!!! Now it works as it should!

Regards
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users