Shop OBEX P1 Docs P2 Docs Learn Events
KeyPad interfacing to BS2 — Parallax Forums

KeyPad interfacing to BS2

ArchiverArchiver Posts: 46,084
edited 2002-06-19 19:53 in General Discussion
I recently purchased 3 EDE1144 keypad chips for my BS2 designs (To
add to the PIC-n-LCD), and I have a few quick questions/requests...

Anyone use these on a BS2? Any problems? I had some trouble getting
communication going at first, then found out they are not inverted
serial like the PIC-n-LCD. Afterward I found that both of my 4 X 4
keypads do NOT match the built-in coding scheme of the EDE1144, so I
wrote a small routine to decode the keys for my keypad. The routine
and my layout are listed below...My question is, does anyone have
some compact code for comparing a string input to one stored in say,
the EEPROM for password input? Or username lookup?

Keypad layout (B.G. Micro Surplus)

1 2 3 A
4 5 6 B
7 8 9 C
* 0 # D

BS2 code to return proper key for this keypad (The EDE1144 returns
ASCII values of keys, I just gosub to the following routine):

KeyScan:
if IN14 = 1 then KeyScan
serin 15,84,[noparse][[/noparse]x]
x=x-48
if x<10 then KeyScan2
x = x - 7
KeyScan2:
lookup x,[noparse][[/noparse]49,50,51,65,52,53,54,66,55,56,57,67,42,48,35,68],y
return

Chris

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2002-06-19 19:25
    With EDE1144 the keypad layout should be:

    0 1 2 3
    4 5 6 7
    8 9 A B
    C D # *



    >From: "Knight_Designs" <knight_designs@y...>
    >Reply-To: basicstamps@yahoogroups.com
    >To: basicstamps@yahoogroups.com
    >Subject: [noparse][[/noparse]basicstamps] KeyPad interfacing to BS2
    >Date: Tue, 18 Jun 2002 17:27:45 -0000
    >
    >I recently purchased 3 EDE1144 keypad chips for my BS2 designs (To
    >add to the PIC-n-LCD), and I have a few quick questions/requests...
    >
    >Anyone use these on a BS2? Any problems? I had some trouble getting
    >communication going at first, then found out they are not inverted
    >serial like the PIC-n-LCD. Afterward I found that both of my 4 X 4
    >keypads do NOT match the built-in coding scheme of the EDE1144, so I
    >wrote a small routine to decode the keys for my keypad. The routine
    >and my layout are listed below...My question is, does anyone have
    >some compact code for comparing a string input to one stored in say,
    >the EEPROM for password input? Or username lookup?
    >
    >Keypad layout (B.G. Micro Surplus)
    >
    >1 2 3 A
    >4 5 6 B
    >7 8 9 C
    >* 0 # D
    >
    >BS2 code to return proper key for this keypad (The EDE1144 returns
    >ASCII values of keys, I just gosub to the following routine):
    >
    >KeyScan:
    > if IN14 = 1 then KeyScan
    > serin 15,84,[noparse][[/noparse]x]
    > x=x-48
    > if x<10 then KeyScan2
    > x = x - 7
    >KeyScan2:
    > lookup x,[noparse][[/noparse]49,50,51,65,52,53,54,66,55,56,57,67,42,48,35,68],y
    > return
    >
    >Chris
    >
    >
    >To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    >from the same email address that you subscribed. Text in the Subject and
    >Body of the message will be ignored.
    >
    >
    >Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >




    _________________________________________________________________
    Send and receive Hotmail on your mobile device: http://mobile.msn.com
  • ArchiverArchiver Posts: 46,084
    edited 2002-06-19 19:53
    --- Mohamed REFKY <refky@h...> wrote:
    > With EDE1144 the keypad layout should be:
    >
    > 0 1 2 3
    > 4 5 6 7
    > 8 9 A B
    > C D # *

    Yes, I understand that...That's why I posted my code,
    so you would know that I already corrected for that.
    What I was looking for was a string compare routine to
    use with my code to check for user password input.

    Chris


    __________________________________________________
    Do You Yahoo!?
    Yahoo! - Official partner of 2002 FIFA World Cup
    http://fifaworldcup.yahoo.com
Sign In or Register to comment.