Shop OBEX P1 Docs P2 Docs Learn Events
Memkey? — Parallax Forums

Memkey?

Helen CHelen C Posts: 34
edited 2005-11-19 07:19 in BASIC Stamp
Hi,

I am trying to get a MEMKEY board working with a BS2pe and 3 x 4 keypad.· I have read the Nuts and Volts article 49 (www.parallax.com/dl/docs/cols/nv/vol2/col/nv49.pdf ) and the Memkey spec sheet.· My problem is that the Memkey does not seem to be responding to the "Program serial key" command ($0A).· This is part of the code that I have used from the NV article.

FOR Index = $00 TO $0F
LOOKUP Index,[noparse][[/noparse]$00,$01,$02,$03,$04,$05,$06,$07,$08,$09,$0A,$0B,$0C,$0D,$0E,$0F],B_1
LOOKUP Index,[noparse][[/noparse]"1","2","3","A","4","5","6","B","7","8","9","C","*","0","#","D"],B_2
LOOKUP Index,[noparse][[/noparse]"V","1",":"," ","0","5",".","0","V","2",":"," ","0","5",".","0"],B_3
SEROUT FM,Baud,[noparse][[/noparse]Peeprom,B_1,B_3]
PAUSE 15
SEROUT FM,Baud,[noparse][[/noparse]Pkeyval,B_1,B_2]
PAUSE 15
NEXT
RETURN

When I send the read key command I get a response that is based on the default settings stored in the Memkey so pressing 1 gives 0 not 1.

Any suggestions please.

Cheers,
Helen

Comments

  • Ken GraceyKen Gracey Posts: 7,387
    edited 2005-11-18 18:26
    Helen,

    That particular Nuts and Volts column is over five years old. It is possible that Solutions Cubed has changed the interface during this time, so double-check their datasheet for the command set just in case. I realize this isn't much help, and I'm sure more will follow shortly.

    - Ken
  • dandreaedandreae Posts: 1,375
    edited 2005-11-18 20:35
    Here are a couple of sample codes to try(attached).· You will need to change the stamp directive to the BS2pe directive.

    Dave

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dave Andreae

    Tech Support
    dandreae@parallax.com
    Http://www.parallax.com
  • Tom WalkerTom Walker Posts: 509
    edited 2005-11-18 21:02
    Any time I see someone using anything but a stock BS2 and a program using the serial functions, I feel compelled to mention that the baudrate parameters are different. Forgetting to change these when using "canned" code seems to be a very common mistake...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truly Understand the Fundamentals and the Path will be so much easier...
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-11-18 21:12
    Tom,

    ·· Don't worry, the baud rate parameters are the same for the BS2, BS2e and BS2pe.· =)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2005-11-18 21:31
    Tom -

    The REALLY sad part is that Jon Williams has kindly offered his any-Stamp-platform baudmode template with conditional compilation coding, that he includes in all of his programs, free for anyone to use. If he's offered it once, he must have done so 100 times or more.

    Since there's no file area on this forum though, there is no simple way to have it made immediately available when others want to make reference to it, as one might do in this case, if it were so safely and simply reposed.

    Saying to someone "Go to the Stamp Forum FTP area and download the conditional compilation file 'baudmode.xxx' which will automatically adjust the baudmode for any Stamp platform you may be using" seems so elegant and useful, I'm just astounded it's not yet been incorporated.

    Regards,

    Bruce Bates
  • kelvin jameskelvin james Posts: 531
    edited 2005-11-19 07:19
    The memkey has some programmable parameters, and the value returned from a keypress is one of them. If you don't want the default values, then you have to program it to the ones you want. I have included the pdf i got from solutions-cubed that explains everything. It has some example code, but the one dave posted is more updated. I have had one for some time, and it makes life very simple for keypad input.

    kelvin
Sign In or Register to comment.