27220 Parallax Inc, 27220 Datasheet - Page 170

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
Page 160 · StampWorks
By reducing the Vref voltage the resolution per output bit is increased. With a Vref
of 2.55 volts, the voltage per bit is 0.01 volts, nearly twice as when 5.00 volts was
used for Vref, and the conversion to millivolts is simplified. This configuration is
useful for sensors like the GP2D12 distance sensor that has a voltage output of 0 to
2.4 volts.
Before running the program modify the Cnts2Mv constant to reflect the Vref
change. With each bit equal to 0.01 volts (1/100) we can multiply by 10 to convert
to millivolts (1/1000).
Cnts2Mv
CON
$0A00
' x 10 (to millivolts)
Note that as the ADC0831 cannot measure below zero volts (floor value is 0), it
cannot measure above Vref. If the differential voltage between pins 2 and 3 is
greater than Vref, the output will be limited to 255. Keep this limitation in mind for
designs where the voltage input could move above Vref.

Related parts for 27220