28129 Parallax Inc, 28129 Datasheet - Page 80

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
Program It
Not only can we use the DVM to measure the output voltage from the D/A converter, we
can automate the testing process to measure all 16 the D/A converter's output voltage
levels. This might not be a big deal for just 16 measurements, but just imagine trying to
test all 4096 voltage steps on a 12-bit converter!
With some relatively simple additions to the code from Chapter #3, which was saved as
file P3_1R3.bs2, we can control both devices. PBASIC can be used to instruct the BASIC
Stamp to send an output signal to the D/A converter. The code for this will be added to
the final version of Program Listing 3.1. This way we can use our DVM from this
experiment to measure the D/A converter's output
Program Listing 4.1 is shown below. It's the final revision of Program Listing 3.1 with a
subroutine labeled
a few additional changes that are pointed out using comments such as ' which means
add this line and ' which shows the lines that have been changed.
If you saved the program listing from Chapter #3, add and modify the code for this
experiment, and save the program under the name P4_1R0.bs2. If you do not have the
code from Chapter #3, enter the entire program listing below using the BASIC Stamp
P0
P1
P2
Voltmeter Input Lead
1
7
6
Vdd
/CS
CLK
D0
ADC0831
DAC
8
Vref
Vdd
5
Vin(+)
GND
Vin(-)
added to send binary voltages to the D/A converter. There are also
2
4
3
Vss
P7
P6
P5
P4
2
2
2
2
kΩ
kΩ
kΩ
kΩ
DAC Output
Vss
1
1
1
2
kΩ
kΩ
kΩ
kΩ
Vss
2
kΩ
Figure 4-2
Schematic.
The DC
voltmeter
from
Chapter #3
is
connected
to the
output of
the
resistive
ladder
network
D/A
converter.

Related parts for 28129