30064 Parallax Inc, 30064 Datasheet - Page 17

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
' -----[ Program Description ]---------------------------------------------
'
'
'
'
'
' -----[ Revision History ]------------------------------------------------
' -----[ I/O Definitions ]-------------------------------------------------
' -----[ Constants ]-------------------------------------------------------
T1200
T2400
T9600
T19200
Baud
DegSym
' -----[ Variables ]-------------------------------------------------------
waxTemp
keyIn
' -----[ EEPROM Data ]-----------------------------------------------------
' -----[ Initialization ]--------------------------------------------------
Startup:
' -----[ Program Code ]----------------------------------------------------
Main:
Ready_Prompt:
Do_Command:
Parallax, Inc. • Stamp PLC (#30064) • Version 1.8 • 12/29/2003
waxTemp = 105
GOSUB Initialize
DO
LOOP UNTIL (keyIn = "W")
SEROUT 16, Baud, [CR, LF, "Ready!", CR]
DO
This program demonstrates how to periodically "listen" for a serial
command while performing another task.
received, it is parsed and acted upon.
within 5 seconds, the serial routine times out and returns to the
user task.
SERIN 16, Baud, 50, Run_Task, [keyIn]
SERIN 16, Baud, 5000, Back_To_Work, [keyIn] ' wait for command
SELECT keyIn
CASE "?"
CASE ELSE
SEROUT 16, Baud,
IF (keyIn <> "X") THEN
SEROUT 16, Baud, [BELL]
[CR, LF, "Wax Temperature = ",
CON
CON
CON
CON
CON
CON
VAR
VAR
DEC WaxTemp, DegSym, "F", CR]
813
396
84
32
T9600
$B0
Byte
Byte
When a serial command is
If no command is received
' degrees symbol
' terminal input
' Run_Task if no input
' wait for "W"
' process command
' bell for invalid input
Page
17

Related parts for 30064