MODEL 141  20-BIT A/D CONVERTER

                                       LAWSON LABS, INC.
                                       3217 Phoenixville Pike
                                       Malvern, PA 19355

                                       Phone   610  725-8800
                                               800  321-5355

Rev. B

                      TABLE OF CONTENTS

INTRODUCTION                                   Page 2

1.  INSTALLATION                               Page 3

2.  PERFORMING CONVERSIONS                     Page 5

3.  CHANNEL SELECTION                          Page 8

4.  CONTROL OUTPUTS & DIGITAL INPUT            Page 9

5.  OPERATING SUGGESTIONS                      Page 10

6.  TROUBLESHOOTING                            Page 11

7.  INTERNAL ADJUSTMENTS                       Page 12

8.  SPECIFICATIONS                             Page 14

WARRANTY                                       Page 15

                     Introduction

     The Lawson Labs Model 141 Analog-to-Digtal card enables
an IBM PC/XT/AT or compatible computer to translate
continuously variable analog voltages into their digital
equivalents of ones and zeros. It also provides a means for
the computer to turn external equipment on and off. These
functions are the basics of monitoring and control systems.
Both the analog inputs and the digital outputs are protected
against overvoltages.
     The Model 141 uses the sigma delta conversion technique
which makes possible extremely high precision and linearity as
well as excellent noise rejection. The 141 can resolve 10
microvolts over a +/- 5 volt range. It will filter out all
frequencies above the cut-off frequency. Be aware that the
filtering causes the converter to need extra time to respond
to a step change at the input.

SECTION 1.    Installation

NOTE: Always handle circuit cards by the edges.

     There are seven DIP switches located near the bottom
edge of the Model 141. These switches determine the base
port address of the card. The base address can be placed
virtually anywhere in the available I/O space, including
places reserved by the operating system. We recommend
addresses between 544 (220 Hexadecimal) and 624 (270 Hex).
The switch positions for base address 560 are 1,4,5 and 6
ON; 2,3 and 7 OFF. If there are other special purpose cards
in your computer you should check their documentation to
make sure the port addresses do not conflict. Although the
Model 141 base address is a multiple of 8, only the first 4
addresses are used. The upper 4 of the 8 are still available
to other boards. Possible base addresses range from 256 (100
Hex) to 998 (3E6 Hex).

FIGURE 1.       Recommended Base Address DIP Switch
                          Selection Chart

                                1= ON          0= OFF
Base address    Hex     7    6    5    4    3    2    1

544             220     0    1    1    1    0    1    1
552             228     0    1    1    1    0    1    0
560 (standard)  230     0    1    1    1    0    0    1
568             238     0    1    1    1    0    0    0
576             240     0    1    1    0    1    1    1
584             248     0    1    1    0    1    1    0
592             250     0    1    1    0    1    0    1
600             258     0    1    1    0    1    0    0
608             260     0    1    1    0    0    1    1
616             268     0    1    1    0    0    1    0
624             270     0    1    1    0    0    0    1

     To obtain the base address from the DIP switches, use 0
for ON and 1 for OFF in the following formula: SW7 * 64 + SW6
* 32 + SW5 * 16 + SW4 * 8 + SW3 * 4 + SW2 * 2 + SW1. Multiply
the above by 8 to obtain the base address. The default switch
settings select board address 560 (230 Hex).
     In addition to the board address switches there is a 3x2
jumper block area located in the upper left hand corner of the
board. The jumper settings select the input clock frequency
for the converter. The clock frequency also affects the update
rate, filter cutoff frequency and settling time.

FIGURE 2.      Clock and Timing Jumper Selections

Jumper:         1  2  3         1  2  3         1  2  3
               |*| *  *         * |*| *         *  * |*|
               |*| *  *         * |*| *         *  * |*|

Clock:          224 KHz         895 KHz         3.58 MHz

Filter
Cutoff:         0.55 Hz         2.2 Hz           8.7 Hz

Output
Update:          218 Hz         874 Hz          3.50 KHz

Settling
Time:           2.27 sec        568 msec         142 msec

     In general, a higher clock frequency allows faster
response while a lower frequency provides lower noise levels.
The clock is factory-set at 895 KHz, a rate satisfactory for
most applications.

     Static electricity can damage computer circuitry so care
should be taken to control static discharge. Turn off the
computer but do not unplug it. Remove the cover.
     First remove the screw which secures the bracket behind a
vacant slot. Then remove the bracket. While holding the Model
141 in one hand touch the computer's chassis with the other.
This procedure will harmlessly drain any static charge that
may be present. Now insert the card into the connector. Press
down firmly to insure that the card is seated and replace the
screw in the bracket. Make certain to double-check the DIP
switch and jumper settings before replacing the cover of the
computer.
     Attach a pair of wires to pins 6 and 13 of a mating DB15
connector. The negative input is pin 13 and the positive input
is pin 6. The other end of the wires should connect to the
voltage being measured. A 1.5 volt battery is a convenient
voltage source for test purposes. For a battery or other
floating voltage source, a connection must be made between the
negative input and ground. The computer's chassis is the
preferred ground for most purposes.

NOTE: Strain-relief is recommended for all permanent wiring on
the connector. Otherwise, physical stress may cause the
failure of an electrical connection. DB15 hoods are available,
from Lawson Labs and elsewhere, with a built-in strain-relief
clamp. 

FIGURE 3:
                CONNECTOR PINOUT

PIN 8...CHANNEL 1+
                     PIN 15...CHANNEL 1-
PIN 7...UNUSED
                     PIN 14...UNUSED
PIN 6...CHANNEL 0+
                     PIN 13...CHANNEL 0-
PIN 5...UNUSED
                     PIN 12...UNUSED
PIN 4...GROUND
                     PIN 11...DIGITAL INPUT
PIN 3...GUARD
                     PIN 10...OUTPUT C
PIN 2...OUTPUT D
                     PIN 9....OUTPUT B
PIN 1...OUTPUT A

    Attach the connector and tighten the small screws that
hold the halves together. Replace the cover. Turn on the power
to the computer. If the power-on self-test (POST) does not
behave normally, turn off the computer and refer to the
troubleshooting section of this manual.
     Connect the plus and minus wires to the voltage being
measured. Make certain that the voltage at both input
terminals is within +/- 6 volts of ground and that the
difference between the input terminals is in the +5 to -5 volt
range. If the voltage source is floating in relation to
ground, e.g. a battery, also connect the minus side of the
voltage being measured to ground. You may use the ground pin
on the Model 141's connector for that ground connection, but
we recommend chassis ground at the computer.

NOTE: For maximum reliability, connect any unused inputs to                    
Pin 4 (ground).

SECTION 2.    Performing A/D conversions

     In the absence of other instructions, the Model 141 card
will measure the voltage at input channel #0. Because the
wires that you attached are connected to input #0, we need not
concern ourselves with the channel selection process at this
time.

     The Model 141 requires four port addresses which are used
for both input and output. When used as inputs, three ports
are needed for reading the result of the conversion and one
provides status information. As outputs, only two of the four
ports are active. They are used for calibration, channel
selection and control of the digital output bits.
     Refer back to FIGURE 1 above and set the variable ADC% in
line number 120 in the BASIC program to the base address of
the Model 141 board as selected by the DIP switch settings.
     This program is included on the accompanying support disk
and is titled DEMO_141.BAS. Be sure to make a backup copy of
your support disk before proceeding.

90 KEY OFF: CLS
100 BP%= 128                 ' BIPOLAR MODE (0 for unipolar)
110 CH% = 0                          ' input channel, 0 or 1
120 ADC% = &H230                     ' default port address
130 GOSUB 250                        ' calibration
140 IF INP(ADC%+3) > 127 THEN GOTO 140  'wait until done *
150 OUT ADC% + 1, 1                  ' assert freeze
160 H = (INP(ADC% + 2) AND &HF)      ' get the 4 high bits
170 M = INP(ADC% + 1)                ' get middle byte
180 L = INP(ADC%)                    ' get low byte
190 OUT ADC% + 1, 0                  ' unfreeze
200 COUNT! = L + M * 256 + H * 65536! ' combine counts
210 PRINT USING "########"; COUNT!,  ' print count
220 VOLTS = COUNT! * 9.536743E-06 - 5 ' convert to volts
230 PRINT USING "#####.#####"; VOLTS  ' print volts
240 IF INKEY$="" THEN GOTO 140 ELSE END  ' press key to stop
250 PRINT "Calibrating"              ' begin cal routines
260 OUT ADC% + 1, 1                  ' freeze
270 OUT ADC%, 48 + BP%               ' offset calibration
280 OUT ADC%, 48 + 64 + BP%          ' set calibration bit
290 OUT ADC%, 48 + BP%               ' clear calibration bit
300 OUT ADC% + 1, 0                  ' unfreeze
310 IF INP(ADC%+3) > 127 THEN GOTO 310   'wait until done
320 OUT ADC% + 1, 1                  ' freeze
330 OUT ADC%, 32 + BP%               ' fullscale calibration
340 OUT ADC%, 32 + 64 + BP%          ' set calibration bit
350 OUT ADC%, 32 + BP%               ' clear calibration bit
360 OUT ADC% + 1, 0                  ' unfreeze
370 IF INP(ADC%+3) > 127 THEN GOTO 370   'wait until done
380 OUT ADC%, CH% * 16 + BP%         ' select channel
390 RETURN                           ' end of calibration

* This line may be omitted for slower PCs and/or interpreted
BASIC.

     Lines 100-120 assign variable names to the desired mode,
channel number and board base address. Line 130 calls a
subroutine which performs offset and full scale calibration of
the converter. Line 140 waits for new data. Next the FREEZE
bit is raised to prevent newer data from overwriting the
current data before all three bytes have been read. In line
190, the FREEZE bit is lowered allowing new data to be
latched. Note that in line 160 the high 4 bits of the most
significant byte must be masked out. In line 200 the three
bytes are weighted and added to equal COUNT! Line 210 displays
the result in counts and lines 220-230 convert the count to
volts and display it. Line 240 repeats the process.
     Line 250 begins the calibration routines. These routines
should be used as is. Changes here can cause unusual results.
     RUN the program. (Press any key to exit.) Successive
pairs of counts and voltage should appear at the left side of
the screen. Note that the readings do not stabilize until the
settling time has elapsed. The Model 141 resolves 10
microvolts. A typical D cell should read about 1.5 volts
(681600 counts in bipolar mode, 314600 in unipolar).
Connecting the input wires directly together will cause a
potential of zero volts. The reading with the input shorted
should be typically +/- 50 microvolts or less. An open circuit
or overvoltage will read unpredictably. The input channels are
protected against overvoltages of up to 120 volts. Reverse the
wires and note the polarity change. Note that the plus sign is
implicit and does not appear.
     The conversion of counts to volts is different for
unipolar and bipolar modes. To select unipolar mode (0 to 5
volt range), set BP% to 0 in line 100. Then change line 220
to:

     220 VOLTS = COUNT! * 4.768372E-06

NOTE: Calibration must be repeated after changing BP%.

     The conversion process itself in a sigma delta converter
is essentially continuous. However since the value available
from the digital filter at the converter output is only
updated periodically, it is necessary to watch the CONVERTING
bit to be certain of reading freshly-converted data instead of
a previously-read value. The CONVERTING bit is set by raising
the FREEZE bit and is reset by new data from the converter.
New data will not be available until after the FREEZE bit has
been lowered. Refer to FIGURE 2 for update rates.
     The digital filter section of the Model 141 has a 6-pole
Gaussian response which sharply attenuates any frequency above
the programmed cut-off frequency. At the                                                       

same time it will pass, with virtually no attenuation,
frequencies below that cut-off. For example with a cut-off
frequency of 10 Hz, 60 Hz rejection is 55 dB. With a .5 Hz
cut-off frequency, 60 Hz rejection is better than 160 dB. 
     Calibration of the Model 141 board must be performed
after powering up and before attempting to make any
measurements. This is the only time calibration is absolutely
required. Temperature changes have a small effect upon the
calibration. Temperature effects are typicaly less than .6
millivolts but may be as much as 2 millivolts. For maximum
accuracy it is advisable to calibrate the board again once it
has reached operating temperature. Additional calibrations may
be done periodically to minimize any temperature effects and
maximize precision.
    On the diskette included with the Model 141 is a driver
program for the A/D board written in BASIC and titled
DRIVR141.BAS. It serves as a programming example and may be
included, wholly or in part, in user programs. The header
portion contains timing and address information. The main body
of the program contains code that allows the user to set up
the Model 141, calibrate offset and full scale, select a
channel, measure voltages and average and display them.
     An assembly routine for averaging a number of readings
(that number being a power of 2) is available on request from
Lawson Labs.

SECTION 3.    Selecting Other Input Channels

     First connect the other voltage to be measured to the 
unused pair of input pins on the Model 141's connector. See
Figure 3. The two available channels are numbered 0 and 1. To
select channel 1, set CH% = 1 in line 110. The channel
selection is sent to the card in line 380.

     380 OUT ADC%, CH% * 16 + BP%

     Because of the nature of the sigma delta conversion
process, a settling time, specified in FIGURE 2, is required
after changing input channels before the reading at the second
channel will be accurate. This delay applies both to the A/D
card's channels and to any external multiplexing device. This
delay allows data from the previous channel contained in the
digital filter stage of the converter to be flushed out and
replaced by data from the newly-selected channel.
     We recommend that the TIME function be used to insert
delays where needed rather than using machine speed dependent
delay loops.

SECTION 4.    Using the Control Outputs & Digital Input

   There are four optically isolated output lines on the Model
141 card. These are intended primarily for expanding the
number of input channels using external multiplexers or
multiplexed amplifiers. The four lines can be decoded to yield
16 different input channels. The external control code is a
4-bit word written to the lower 4 bits of the control
register. Configurations of up to 32 analog inputs are
possible with two Model 17B Multiplexers.
     A number from 0 to 15 sent to port ADC% will appear on
the output lines, coded in binary. The instruction OUT ADC%, 3
will cause outputs A and B to become active. Below is a list
of codes and the corresponding active outputs. Note that the
sequence is that of counting in binary. 1=active.

              TABLE 2.

  CODE           OUTPUT  D C B A

   0                     0 0 0 0
   1                     0 0 0 1
   2                     0 0 1 0
   3                     0 0 1 1
   4                     0 1 0 0
   5                     0 1 0 1
   6                     0 1 1 0
   7                     0 1 1 1
   8                     1 0 0 0
   9                     1 0 0 1
   10                    1 0 1 0
   11                    1 0 1 1
   12                    1 1 0 0
   13                    1 1 0 1
   14                    1 1 1 0
   15                    1 1 1 1

     If an external multiplexer is used, the channel selection
code is the sum of the external control code and the A/D
channel number times 16.

     CHANNELCODE% = CH% * 16 + EXTCODE%

     Codes 0-31 can select valid channels on the Model 141
(with external multiplexers). Remember that the variable BP%
should always be added to the channel selection code before
outputting to the card.
     Electrically, each output line is the collector of an
optically coupled NPN transistor whose emitter is connected to
guard. Each output line can drive two low-power TTL loads or
many CMOS loads. An external pull-up resistor (from the
collector to the external positive supply) must be used.
Typically, 20 K ohms for low-power TTL or 47 K ohms for CMOS
is appropriate. When the output code is 0 all four
phototransistors are off and no current is drawn through the
transistors. If the input to an inverting buffer is connected
to output line A (with the appropriate pull-up resistor), the
input level is forced high by the resistor so the buffer
output would be 0. If the output code is 1, the A transistor
will turn on and pull the buffer input to a logic level 0. The
buffer output will then be a logic level 1.
     The digital input can be a contact closure to ground or a
TTL or 5 volt CMOS logic level, active low. This line reads
the digital input.

IF (INP(ADC% + 3) AND 16) THEN PRINT "off" ELSE PRINT "on"

SECTION 5.    Operating suggestions

     The Model 141 features fully differential inputs. A basic
understanding of differential measurements will help you to
use your card to best advantage. The plus and minus input pins
should be wired directly to the voltage being measured. In
this way, it is assured that the only current flowing in the
wires will be the input current of the A/D converter. Because
the wires have finite resistance, any current flowing will
cause a voltage drop and a corresponding error. The card
requires a vanishingly small input current so the error caused
by even very long wires is negligible. For proper operation of
the Model 141 it is necessary that both the positive and
negative inputs be within 6 volts of ground potential. For a
floating voltage source, this is generally accomplished by
connecting a third wire between the computer chassis and a
ground terminal at the source of the measured voltage. Ground
currents may flow in this third wire, but the resulting
voltage drops will not cause measurement errors. If the source
of the voltage being measured is a line-connected device with
a three-pronged plug, its output voltage is likely to be
referenced to ground. In that case, no ground connection
should be made or a ground loop will be formed. Ground loops
can cause unpredictable behavior.

     The Model 141 has excellent intrinsic noise rejection.
Still, accuracy is sometimes limited by electrical noise that
travels through the air and is picked up by intercon-necting
wires. The first defense against noise is shielding. If you
suspect noise problems, use shielded wire with the shield's
drain wire connected at one end to chassis ground. Sometimes
twisting together the plus and minus wires on an input to form
a twisted pair will minimize pick-up. If noise problems
persist, try to locate the sources of the interference and
isolate them. Electric motors, electric heaters and flickering
fluorescent lights are potential sources of interference.

SECTION 6.    Troubleshooting

GENERAL:

     If the A/D converter appears not to be working, first
check all external wiring and all port addresses. Double check
the switch settings on the Model 141. Be sure that all input
voltages are within range. If another special function card is
present, check for conflicting port addresses. Also, try
adding a wire from the negative input to ground.

1.  Results seem to be meaningless numbers

     The most likely culprit is a loose wire or an input with
nothing attached. Try connecting the + and - inputs to ground.
If the voltage does not read within approximately 50
microvolts of 0, the problem is in the wires themselves or in
the channel selection. Check that the program has been
correctly entered.

2.  The computer hangs up and requires a Ctrl Break to resume
operation after trying to read a voltage.

     Maybe the ADC% port address is wrong or in conflict with
another card. The computer is waiting indefinitely for the
conversion to finish. Also, check that the programming jumper
for the clock is in place.

3.  Readings show excessive scatter.

     First check for proper grounding. If there is no
connection between the negative input and ground, try one. If
there is such a connection, try removing it.

     If the card reads zero volts properly but still returns
widely varying numbers when measuring a voltage, the voltage
could be oscillating or noisy. If you check the voltage with
another voltage-measuring device remember that some meters
will average out oscillations or noise to produce a steady
reading. Try switching to an alternating current scale. If you
get a large reading the voltage is certainly unsteady. The
Model 141 will filter out high frequency noise. However, any
oscillation below the cut-off frequency can cause increased
scatter.

4.  External multiplexer or multiplexed amplifier always reads
channel 0.

     Make sure the ground on any external multiplexer or
multiplexed amplifier is connected to the guard terminal on
the Model 141's connecter.

5.  Power On Self Test does not run.

     If ADC% is not 560, check the DIP switch address settings
to make sure there is no conflict with the operating system.
Look for any mechanical problems such as the A/D card
physically touching an adjacent card. Is the card fully
inserted in its slot? Be sure that no  interconnecting cables
were loosened during the installation process.

SECTION 7.    Internal Adjustments

     The only adjustments on the Model 141 card are a common
mode rejection adjust and an overall gain adjust. The latter
varies the reference voltage used during the A/D conversion.
     The long-term stability of the initial calibration is
excellent. If you decide to alter the original gain setting,
be sure your voltage reference or test meter is sufficiently
accurate and has been calibrated recently. Remember that if
you change the gain setting you may not be able to restore the
converter to its original accuracy.
     The gain adjustment potentiometer is at the top edge of
the Model 141 card and is the one farthest from the rear panel
connecter. A clockwise rotation will increase the magnitude of
the reading. It is best to make any adjustment with the card
at its normal operating temperature. For best results, adjust
the gain using a low noise DC voltage source of between 2 and
4 volts.

     The common mode rejection adjustment does not require an
external voltage reference, though you will probably want to
recheck the gain after setting the common mode. The common
mode potentiometer is located nearest the rear panel of the
computer. To adjust for maximum common mode rejection (106
dB), first connect both inputs of the selected channel
together and to ground with the converter in bipolar mode.
Note the voltage or count reading displayed. Now connect both
inputs of the selected channel to the plus terminal of a 1.5
volt battery and connect the minus terminal of the battery to
ground. Adjust the potentiometer so the displayed voltage or
count is the same as before. Always do a software calibration
after adjusting the trimpots.

SECTION 8.    Model 141 Specifications

TYPE:                       20-bit sigma delta

DIFFERENTIAL INPUT RANGE:   +/- 5 volts or 0 to 5 volts

COMMON MODE RANGE:          +/- 6 volts

COMMON MODE REJECTION:      100 dB minimum

RESOLUTION:                 10 microvolts

LINEARITY:                  0.005% of full scale *

ACCURACY:                   0.01% of full scale typical at
                            normal operating temperature *

REPRODUCIBILITY:            +/- 4 counts or better
                            in bipolar mode

INPUT IMPEDANCE:            100,000 megohms typical

CLOCK RATE:                 224 KHz  /  895 KHz  /  3.58 MHz

CUT-OFF FREQUENCY:          0.55 Hz  /  2.2 Hz   /   8.7 Hz

UPDATE RATE:                 218 Hz  /  874 Hz   /  3.50 KHz

SETTLING TIME:              2.27 sec /  568 msec /  142 msec

ANALOG INPUTS:              2, fully differential
                            protected up to 120 volts

DIGITAL INPUT:              Single bit, contact closure
                            or 5-volt logic compatible

DIGITAL OUTPUTS:            4 optically isolated lines
                            protected to 200 volts

TYPICAL POWER               +5v . . . . 15 milliamps with
CONSUMPTION:                 all digital outputs inactive
                            +12v. . . . 15 milliamps
                            -12v. . . . 15 milliamps

SIZE:                       3.9 x 5.25 inches
                            (half card size)
                            .6 inches maximum height

* Premium versions available from the factory at extra cost

LIMITED WARRANTY

     The Lawson Labs, Inc. Model 141 is guaranteed against
defects in materials and workmanship for a period of one year
from the date of delivery. Products must be returned to Lawson
Labs for warranty service. Contact Lawson Labs at 800 321-5355
for return authorization before returning anything for
service.
     The above warranty is in lieu of all warranties express
or implied. Lawson Labs will not be liable for indirect or
consequential damages caused by any defect in this product.
Some states do not allow the limitation of consequential
damages, so the above exclusion may not apply to you.