28129 Parallax Inc, 28129 Datasheet - Page 82

TEXT BASIC ANALOG & DIGITAL

28129

Manufacturer Part Number
28129
Description
TEXT BASIC ANALOG & DIGITAL
Manufacturer
Parallax Inc
Type
Programmingr
Datasheet

Specifications of 28129

Style
Book
Title
Basic Analog and Digital
Contents
Basic Analog and Digital Text
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Not applicable / Not applicable
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 28129