28128 Parallax Inc, 28128 Datasheet - Page 82

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
RETURN
Calc_Volts:
RETURN
Display:
RETURN
The Output
Given perfect resistor values, the output would be 3.00 volts. The resistors used in this
sample have a 10% tolerance. This means that the measured resistance for each resistor
should have a value within ±10% of what it’s supposed to be. Because of this, we can
expect the output to be slightly different than what’s expected, such as the measured
value in Figure 4-3. Given perfect resistor values, the measurement would be 2.20 volts.
LOW CLK
PULSOUT CLK, 210
SHIFTIN DataOutput,CLK,MSBPOST,[adcBits\8]
v = 5 * adcBits / 255
r = 5 * adcBits // 255
v2 = 100 * R / 255
v3 = 100 * R // 255
v3 = 10 * v3 / 255
IF (v3 >= 5) THEN v2 = v2 + 1
IF (v2 >= 100) THEN
ENDIF
DEBUG HOME, CR, CR, "Decimal value to DAC:
DEBUG CR, CR, "Binary value to DAC:
DEBUG CR, CR, "DVM Reading:
v = v + 1
v2 = 0
", DEC1 v, ".", DEC2 v2, " Volts"
", BIN4 n
", DEC2 n

Related parts for 28128