27220 Parallax Inc, 27220 Datasheet - Page 212

BOOK STAMPWORKS

27220

Manufacturer Part Number
27220
Description
BOOK STAMPWORKS
Manufacturer
Parallax Inc
Datasheet

Specifications of 27220

Accessory Type
Booklet
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
StampWorks
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Not applicable / Not applicable
Show_Leds:
Set_Leds:
Behind the Scenes
Without asynchronous serial communications the world would not be what it is
today. Businesses would be hard pressed to exchange information with each other.
There would be no ATMs for checking our bank accounts and withdrawing funds.
There would be no Internet.
Previous experiments have used synchronous serial communications. In that scheme,
two lines are required: clock and data. The benefit is the automatic synchronization
of sender and receiver. The downside is that it requires at least two wires to send a
message in one direction.
Asynchronous serial communications requires only a single wire to transmit a
message. What is necessary to allow this scheme is that both the sender and
receiver must agree on the communications speed before the transmission can be
received. Some "smart" systems can detect the communications speed (baud rate),
the BASIC Stamp cannot.
In this experiment we’ll use SEROUT to send information to a terminal program and
SERIN to take data in. The input will usually be a command and sometimes the
command will be accompanied with new data. Note that the SERIN connection is
actually defined as two pins:
tempIn.BYTE1 = -sign
tC = tempIn * 5
IF (tC.BIT15 = 0) THEN
ELSE
ENDIF
RETURN
SEROUT TX\RTS, Baud, ["Status = ", BIN4 LEDs, CR]
RETURN
SERIN RX\CTS, Baud, [BIN param]
LEDs = param.LOWNIB
RETURN
tF = tC */ $01CC + 320
tF = 320 - ((ABS tC) */ $01CC)
SERIN RX\CTS, Baud, [WAIT ("?"), HEX cmd]
' extend sign bit
' convert to tenths
' temp C is positive
' convert to F
' temp C is negative
' convert to F
' use binary input
' set the outputs

Related parts for 27220