Shop OBEX P1 Docs P2 Docs Learn Events
source code for keypad through lcd display HELP!!!!! — Parallax Forums

source code for keypad through lcd display HELP!!!!!

ClineCline Posts: 36
edited 2006-06-09 18:57 in BASIC Stamp
Hello, im new to this,· i have a ls 204-25 display with keypad attached, i am comunicating well with the display but cannot see the keypad doing anything, dont even know how to test it,·· i placed these commands in the editor

SEROUT 1, 84, [noparse][[/noparse]254]······ 'Command Prefix
SEROUT 1, 84, [noparse][[/noparse]66]······· 'Backlight ON command
SEROUT 1, 84, [noparse][[/noparse]2]········ 'Setting the number of minutes to be on
· SEROUT 0, 84, [noparse][[/noparse]254]······ 'Command Prefix
SEROUT 0, 84, [noparse][[/noparse]65]······· 'key AutoTransmit ON
· SEROUT 0, 84, [noparse][[/noparse]254]······ 'Command Prefix
SEROUT 0, 84, [noparse][[/noparse]85]······· 'key Debounce time command
SEROUT 0, 84, [noparse][[/noparse]8]········ 'key Debounce time nominal of 52ms
·

i am guessing there needs to be a serin command·· but i have no clue how to write it,·

serin 1, 84, ???????

i am trying to use the keypad for a password program·,
' {$STAMP BS2}
' {$PBASIC 2.5}
DEBUG"Micro Board Self Diagnostics" , CR
PAUSE 2000
LOW 14
LOW 15
'data directives
Password··········· DATA··· "33722"
'variable declarations
index······· VAR·· Nib
temp········ VAR·· Byte
userentry··· VAR·· Byte(5)
'initialization routine
GOSUB check_password
'main routine
DEBUG CR, "complete"
END
'subroutine
check password
check_password:
SEROUT 0, 84, [noparse][[/noparse]254]
SEROUT 0, 84, [noparse][[/noparse]65]
· DO
· DEBUG CR,"Enter Password"
· DEBUGIN STR userentry \5
· FOR index=0 TO 4
· READ password + index, temp
· IF temp <> userentry(index) THEN EXIT
· NEXT
· IF index <> 5 THEN
· DEBUG CR, "password incorrect"
· ENDIF
· LOOP UNTIL index=5
· DEBUG CR, "accessed"
·SEROUT 0, 84, [noparse][[/noparse]254]······· 'Command Prefix
SEROUT 0, 84, [noparse][[/noparse]88]········ 'Clear screen command
SEROUT 0, 84, [noparse][[/noparse]"·· Mainframe Online "]
SEROUT 0, 84, [noparse][[/noparse]"· Tracking System..."]
PAUSE 2000
SEROUT 0,84,[noparse][[/noparse]254]
SEROUT 0, 84, [noparse][[/noparse]88]
SEROUT 0, 84, [noparse][[/noparse]"·· Initilize I.R."]
··
dont no where to put these..
·SEROUT 1, 84, [noparse][[/noparse]254]······ 'Command Prefix
SEROUT 1, 84, [noparse][[/noparse]66]······· 'Backlight ON command
SEROUT 1, 84, [noparse][[/noparse]2]········ 'Setting the number of minutes to be on
· SEROUT 0, 84, [noparse][[/noparse]254]······ 'Command Prefix
SEROUT 0, 84, [noparse][[/noparse]65]······· 'key AutoTransmit ON
· SEROUT 0, 84, [noparse][[/noparse]254]······ 'Command Prefix
SEROUT 0, 84, [noparse][[/noparse]85]······· 'key Debounce time command
SEROUT 0, 84, [noparse][[/noparse]8]········ 'key Debounce time nominal of 52ms
SERIN 1, 84, ???????????????????????????????????????????????????????

thank you for looking at this...

Comments

  • ClineCline Posts: 36
    edited 2006-06-09 17:20
    Btt
  • dandreaedandreae Posts: 1,375
    edited 2006-06-09 17:35
    Here is a sample code for an LCD and a matrix keypad (attached).

    Dave

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

    Tech Support
    dandreae@parallax.com
    Http://www.parallax.com
  • ClineCline Posts: 36
    edited 2006-06-09 17:45
    hello,·

    I ran the file but nonething happens,· my out is pin 0···· in·· pin 1

    do i need to change them in the program,·· i dont really undertand the code i just cut and paste what works,

    i do undestand somethings· serout 1, 84, [noparse][[/noparse]""] etc.



    I dont even know if the keypad is hooked up right,· i used a "flat" harddrive cable to connect the keypad to the lcd,· seems like i could test it to see if im getting an input.....
  • ClineCline Posts: 36
    edited 2006-06-09 17:49
    I am using a lk204-25 rev 1.23 [noparse][[/noparse]matrix orbital] and the 16key pad, both ordered from parallax,
  • ClineCline Posts: 36
    edited 2006-06-09 18:21
    How can i see if a signal is being sent from the keypad?
  • dandreaedandreae Posts: 1,375
    edited 2006-06-09 18:48
    Try this code (attached).

    Dave

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

    Tech Support
    dandreae@parallax.com
    Http://www.parallax.com
  • ClineCline Posts: 36
    edited 2006-06-09 18:57
    YYEEEEAAAHHH, ok i have functions, ill study this to see how i can incorporate it into the program, At least i know its connected right

    thank you SO Much,

    Ill try to dissemenate the information thanks again,,

    Charles Cline
    C.E.O.
    I.S.S. Inc.
Sign In or Register to comment.