27220 Parallax Inc, 27220 Datasheet - Page 167

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
DataIn
' -----[ Constants ]-------------------------------------------------------
Cnts2Mv
' -----[ Variables ]-------------------------------------------------------
result
mVolts
' -----[ Initialization ]--------------------------------------------------
Reset:
' -----[ Program Code ]----------------------------------------------------
Main:
' -----[ Subroutines ]-----------------------------------------------------
Read_0831:
LOOP
DEBUG CLS,
DO
LOW CS
SHIFTIN DataIn, Clock, MSBPOST, [result\9]
HIGH CS
RETURN
GOSUB Read_0831
mVolts = result */ Cnts2Mv
DEBUG HOME,
PAUSE 100
"ADC....
"volts... "
CRSRXY, 9, 0, DEC result, CLREOL,
CRSRXY, 9, 1, DEC mVolts DIG 3,
PIN
CON
VAR
VAR
", CR,
2
$139C
Byte
Word
".", DEC3 mVolts
' data (ADC0831.6)
' x 19.6 (to millivolts)
' result of conversion
' millivolts
' create report screen
' read the ADC
' convert to millivolts
' report
' enable ADC
' read ADC
' disable ADC

Related parts for 27220