30064 Parallax Inc, 30064 Datasheet - Page 19

STAMP PLC

30064

Manufacturer Part Number
30064
Description
STAMP PLC
Manufacturer
Parallax Inc
Datasheet

Specifications of 30064

Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With/related Products
BASIC Stamp®
Module/board Type
-
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Lead free / RoHS Compliant
Other names
Q2172565
' -----[ I/O Definitions ]-------------------------------------------------
' -----[ Constants ]-------------------------------------------------------
T1200
T2400
T9600
T19200
Baud
' -----[ Variables ]-------------------------------------------------------
keyIn
serString
' -----[ EEPROM Data ]-----------------------------------------------------
' -----[ Initialization ]--------------------------------------------------
Startup:
' -----[ Program Code ]----------------------------------------------------
Main:
Resume_Program:
Run_Program:
' -----[ Subroutines ]-----------------------------------------------------
Read_Password:
Parallax, Inc. • Stamp PLC (#30064) • Version 1.8 • 12/29/2003
GOSUB Read_Password
IF keyIn = $FF THEN GOSUB Set_Password
SERIN 16, Baud, 500, Run_Program, [WAITSTR serString\4]
DEBUG CR, "Password accepted!"
DO
LOOP
DEBUG CR
DEBUG "*"
GOTO Main
DEBUG CR, "C:> "
SERIN 16, Baud, [keyIn]
SELECT keyIn
ENDSELECT
CASE "X"
CASE "N"
CASE "C"
CASE ELSE
GOTO Resume_Program
GOSUB Set_Password
GOSUB Clear_Password
DEBUG " : Invalid command",BELL
CON
CON
CON
CON
CON
VAR
VAR
813
396
84
32
T9600
Byte
Byte(4)
' terminal input
' Read password
' If not set, set it
' else, start main code
' Once password received
' get a command
' process command
' otherwise, run the
' user's program
' user program goes here
' Read password from eeprom
Page
19

Related parts for 30064