28128 Parallax Inc, 28128 Datasheet - Page 64

no-image

28128

Manufacturer Part Number
28128
Description
KIT BASIC ANALOG/DIGI PARTS ONLY
Manufacturer
Parallax Inc
Datasheet

Specifications of 28128

Accessory Type
ADC, DAC
Product
Microcontroller Accessories
For Use With/related Products
BASIC Stamp® 2 and Board of Education
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Calculate Voltage
Now that we know the decimal equivalent of the ADC0831’s binary output, we can do a
few calculations to get the measured voltage. To find out what voltage the decimal
number corresponds to, we need to calculate where in the voltage range the number falls.
Here is an effective way to think about the problem.
This translates to fractions as:
We can re-arrange this equality to calculate the voltage:
We know that the voltage is on a 0 to 5 volt scale, and we know that the
ADC0831’s output is on a scale from 0 to 255.
In other words, the measured voltage is to 5 as the A/D output is to 255.
Voltage=
Voltage
5
=
5
Decimal
×
(Decimal
A
255
255
/
A/D
D
Output
Output)
Figure 3-6
Debug Terminal
Output for Program
Listing 3.1,
Revision 1.

Related parts for 28128