source code for keypad through lcd display HELP!!!!!
Cline
Posts: 36
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...
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
Dave
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dave Andreae
Tech Support
dandreae@parallax.com
Http://www.parallax.com
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.....
Dave
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dave Andreae
Tech Support
dandreae@parallax.com
Http://www.parallax.com
thank you SO Much,
Ill try to dissemenate the information thanks again,,
Charles Cline
C.E.O.
I.S.S. Inc.