27220 Parallax Inc, 27220 Datasheet - Page 175

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
Moving Forward · Page 165
To convert from Celsius (in tenths) to Fahrenheit (also in tenths) a modification of
the standard temperature equation is used:
F
= (C
* 1.8) + 320
tenths
tenths
Note that 32 degrees from the standard equation has also been converted to tenths.
For the conversion of negative temperatures the order of elements in the equation is
reversed. The reason for this is that negative numbers cannot be divided in PBASIC.
The ABS operator is used to convert the intermediate result to a positive value.
When subtracted from 320 the result will be properly aligned (and signed); some
negative values in the Celsius range are still positive in Fahrenheit.
The display routine uses a little trick that looks at Bit15 of the value; if Bit15 is one
then the temperature is negative and a “-“ will precede the temperature reading,
otherwise a space will be printed.

Related parts for 27220