The Analog Interface Module, shown in Fig. 1,
provides two Analog to Digital (A-D) conversion de-
vices, two Digital to Analog (D-A) conversion devices, a
comparator, various buffers, and an analog meter.
intended to demonstrate a variety of analog interface
concepts using limited-precision monolithic devices and
could be used to prove feasibility where higher accuracy
is required. All components are configured on the
board for a 0 to 10 volt range. The Diagram of Fig. 2
shows the major functions on the board as well as giving
a schematic identification of the 1/0 pins on the board.
‘The schematic diagram is the last figure ofthis repor.
D-A Converter - Resistor Ladder
One type of D-A Converter is represented by an
Analog Devices ADSS8. It uses a resistor network to
add binary weighted values from a reference (on the
chip) to an output current. This is converted to a volt-
age and scaled to 10V full scale by an op amp (also
within the IC). It is an 8 bit converter which puts out 0
volts when the input is all 0's and puts out +10 volts with
all T's input. Each bit change produces a change of
about 40mV(10v/256 levels), The output voltage settles
tty 2v +5y
blue looms violt red black
2 Analog Interface Block Diagram
The Micro Lab Analog Interface Module
Fig. 1 Analog Interface Board
in about 1 microsecond.
‘The ADSSS has an internal latch (transparently en-
abled on the lab board) which makes it suitable for
rect interface to a microcomputer bus. It can also oper-
ate off only 5 volts (0 to 2.56 volt output range). A741
operational amplifier is added, along
with 7407 TTL buffers, for protection,
(ADSS85_ cost about "$7.50 each in
Dive quantity of 25).
Other D-A techniques
Aside from the resistive-ladder
type of conversion, there are at least
two other techniques which involve a
single bit stream and an analog
integration component, The first
gnd involves a _—_frequency-to-voltage
MAconvert conversion where the input from the
Esta e80y- Computer i a varablefequeney pulse
twain with the higher frequency
producing the higher voltage output.
This could be done with a different
configuration of the LM331.
do ‘The second technique, commonly
used for high-resolution audio output as
in digital audio or CD players, is called
signa-delta conversion. It entails a bit
stream driving a one-bit converterWhich feeds an integrator. A stream of 15 drive the
output high and a stream of 0s drive it low. An
alternating stream of 1s and 0s would produce a mid-
range value.
In both cases the rate of change is limited but there
can be very real benefits to a system that is 1/0 pin lim-
ited or aiming to minimize hardware costs.
Comparator
‘A National Semiconductor LM 311 comparator is
included to allow the D-A Converter to be used under
microcomputer control as an A-D Converter. The mi-
‘ro can_adjust the digital input of the D-A until the re-
sulting D-A output voltage crosses over the unknown
‘analog voltage. At that point the digital input is the
‘equivalent of the unknown analog voltage. There are
three common methods the computer can use to find the
“cross over” point:
1)ramping - counting up one count at atime
2)suecessive approximation - trying the most sig-
nificant bit, either including or zeroing the bit
based on the comparator response, and working
down to the least significant bit,
3)tracking - trying the most recent value and ad-
justing up or down to find the new value.
The first method could take anywhere from 1 to
256 tries to find the crossover. Method two always re-
quires 8 trials to establish the value (for an 8 bit resolu-
tion). Method three can take as few as 1 or 2 tries if the
voltage being measured is changing slowly compared to
the measurement frequency.
‘The comparator puts out a logic 1 when the un-
known is less than the D-A voltage or a 0 when it is
greater. Because of the high gain and about 30mV of
hysteresis, a rapid transition occurs when the voltages
cross over, and the device never considers “equal” as an
output option.
Analog Meter
‘The voltmeter can be switched between displaying.
the analog input (from a pot on the board or from an
external input) or the analog output from the D-A con-
verter. It is omly accurate to a few percent of full scale
and is quite slow in responding to voltage changes. Ob-
serving actual D-A activity under computer control re-
quires an oscilloscope since software loops can produce
steps in as little as 10 microseconds. The digital meter
connection posts can be also used for an oscilloscope.
A-D Converter--Successive Approximation
‘The A-D converter on the board is an Analog De-
vices ADS73, It is a monolithic 10-bit converter which
puts out a code of 0000000000 for zero volts and a code
of 1111111111 for 10 volts, so each bit change represents
a voltage change of about 10 mV.
‘As configured for the lab board, a convert com-
‘mand must be sent from an I/O port. You can drive the
CONVERT line high and then immediately back low
(producing at least a 500 nSec. pulse). Following the
start of conversion, you can read correct data only after
the DATA READY/ line goes low (up to 30 microSec af-
ter the start of
conversion),
The — simplest
way to do this is
{assumes d2-c9 to poate
[strobe to esb of PoaTe
Jeatardy/ "co bits of porte
HClgnorts Becton 2"bits oF result
to toggle the
readad: mov dtr
CONVERT line feria ae
and then pen epee
immediately sows Béptr
enter a polling | * my sath
iow on Da Segoe
READY/. This ret”
is the method |p,
Show in igs | FS AD Interac Sofware
and 4, It would embly
be more
efficient for the
software 10 g0
off and do
something else | yint resdad (void
and return Poriesteas;
sometime later
to check the
Tine, Tt is also | 9
possible to use
an interrupt to
the computer
driven off the
negative edge of the DATA READY/ line to avoid the
inefficiency of polling. The data remains on the A-D
output lines until the next conversion is started, so there
may be cases where you might not collect the data for
some time.
PPassunes 42-9 into, PORTE
‘rd into Isb of PORTE
Strobe ‘from neb of PORTE
datardy/"to bits of PORTCH/
rerdy 2087
Theo
Terorreas»9;
Fig. 4 A-D Interface Software~-C
‘The AD 573 uses successive approximation tech-
niques (described in the D-A section) which gives rela-
tively fast conversion, In this ease, the 10-bit reading is
available in 10 to 30 microseconds. Successive approxi-
mation is not very noise immune during the measure-
ment period because a glitch can cause an erroneous
comparison and produce errors all through the rest ofthe conversion... In a normal design the device could
casily stand alone directly on the microcomputer’s bus.
Here the 741 and 7407s are added to protect the device
(Which costs about $17.50 in quantity 25). ‘The device in-
cludes its own clock and voltage reference as well as the
tri-state buffering to allow the 10 bits to be read as a
group of eight and a group of 2 bits enabled directly on a
bus.
A-D Converter - Voltage To Frequency
‘The National Semiconductor LM 331 is used here
as a voltage fo frequency converter. An oscillator (pulse
generator) changes output frequency in a manner di
rectly related to an incoming voltage. The computer ei
ther measures the time between two pulses or counts
pulses for a fixed period of time to determine the un-
known voltage. ‘The latter method is preferable since it
js much more noise immune. This conversion method
can also be quite accurate and inexpensive. It also al-
lows simple and inexpensive optical isolation for noise
suppression, breaking ground loops, and computer pro-
tection. (The LM 331 costs $3.00 in quantity of 25),
Other A-D techniques
Integrating converters measure the incoming volt-
age over a long time in a way that averages out noise, so
the reading can be quite stable. The technique is partc-
ularly useful for readings of steady signals in lots of
noise, and can be quite precise for relatively low costs.
‘Two (patented) variations of the basic integrating con-
version method are called dual slope and charge bal-
ancing.
Another, much faster conversion technique is
called flash conversion. A voltage ladder with every pos-
sible reading level (256 for 8-bits) feeds that many com-
parators which in turn feed a logic network to get the re-
sult in a time limited by the propagation delays. You
can see that this involves a lot of circuitry for the resotu-
and increases significantly as resolution goes up.
Flash conversion is commonly used to digitize video s
nals for image processing. Its price rules it out for in-
clusion on this board!