MODEL 250
                23-BIT DATA ACQUISITION SYSTEM

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

                                           610 725-8800
                                                or
                                           800 321-5355

Rev. 4

                       TABLE OF CONTENTS

INTRODUCTION                                                  1

SECTION 1: INSTALLATION                                       2

SECTION 2: OPERATION                                          4
    Establishing Communications                               4
    Long-Term Calibration                                     5
    Polled Mode Overview                                      5
    Connecting Analog Inputs                                  8
    Digital Input/Output Commands                             9
    ScScanning Mode                                           9
    Fast Single-Channel Scan Mode                            10
    Normal Scan Mode                                         11
    Time-Stamped Scan Mode                                   11
    Acquiring and Viewing Scanned Data                       12
    Self-Calibration                                         12

SECTION 3: OPERATING SUGGESTIONS                             14
    Digital Input and Output                                 15

SECTION 4: USER'S TECHNICAL REFERENCE                        17
       
SECTION 5: TROUBLESHOOTING                                   23

SECTION 6: INTERNAL ADJUSTMENTS                              24

SECTION 7: MODEL 250 SPECIFICATIONS                          25
      
WARRANTY                                                     26

                         INTRODUCTION

   The Lawson Labs, Inc. Model 250 23-Bit Data Acquisition
System is a high-resolution, medium speed, device for
translating voltages into digital form. The Model 250
communicates with a host computer via the parallel port. It
has 6 multiplexed differential analog input channels with
provision for expansion to a total of 96 channels. Twenty
digital input/output lines are available for general purpose
use. 
   The Model 250 accepts +/- 5 volt signals. It can digitize
waveforms of up to several kHz while maintaining excellent DC
accuracy. The data rate is programmable from under 10 to over
5000 samples/second. The Model 250 can be set to operate
either as a sampling converter (Track/hold mode) for AC
signals, or as a tracking only converter for DC signals. At
full speed, effective resolution is over 19.5 bits. Digital
averaging increases the effective resolution. In Track/hold
mode, averaging can reduce only residual converter noise,
allowing 20-bit effective resolution at reduced speed. In DC
mode, all noise sources can be reduced through averaging,
including noise on the input signal itself. At a data rate of
80 samples/second in DC mode, the RMS noise approaches one
count, providing 23 bits effective resolution. (The converter
is monotonic to 22 bits.)
    The Model 250 requires a triple output DC supply at +5 and
+/- 15 volts. A well regulated linear supply is provided. Both
the power inputs and analog inputs are protected against
substantial overvoltages.
    Polled and scanning modes are available. In polled mode,
the host computer requests individual conversions. In scanning
mode, the host sends the scanning sequence and timing
information to the Model 250 then sends a "start" command. The
Model 250 paces itself precisely while acquiring and
transmitting the data. With external multiplexers, up to 96
input channels can be scanned. Scanning rates from under 1 per
hour to over 5000 per second are supported. Other features
under software control include triggering, self-calibration,
eight general purpose digital inputs and eight digital
outputs. 
   The exceptional resolution, linearity, speed, and
flexibility are achieved by combining a multi-pass, self-
correcting, successive approximation converter with a RISC
microcontroller supervisor. The microcontroller allows the
sophisticated A/D to communicate via a standard parallel
interface. A bi-directional or high-speed parallel port is not
required.

SECTION 1: INSTALLATION

   The Model 250 interconnections consist of three cable
connectors and a 5-pin circular power connector. Locate the
cable connectors at the bottom of the card. From left to
right, they are analog input, parallel port, and digital
input/output.

NOTE:  Always handle circuit cards by the edges. Static
       electricity can damage computer circuitry so care
       should be taken to control static discharge.

   For operational checks, only the power supply and parallel
cable need be connected. The board is protected against
incorrect power supply voltages but will not operate without a
proper supply. The power can be connected before or after the
interface connection is made to the host computer. 
   Figure 1 shows the input and output connectors. The 4-bit
optically isolated output allows use of Model 17B, 20B, and
35B multiplexers and multiplexed amplifiers.

   The parallel interface uses a high-density 15-pin
connector. The Model 250 shares a common ground with the host
computer. Under some circumstances, best noise performance
will be obtained by making an additional connection between a
ground pin on the Digital I/O connector and chassis ground at
the host computer. The parallel pinout is defined in Table 1.
The cable provided can be used with standard 25-pin D-sub type
extender cables. Parallel Port cable lengths over 25 feet may
reduce speed or decrease effective resolution.  

   For maximum accuracy and stability the board should be
enclosed in a shielded box. Even if the Model 250 is placed
inside another enclosure, we recommend leaving the board in
its standard case.
FIGURE 1: MODEL 250 BLOCK DIAGRAM 

                                            
                                            
               FIGURE 2: PARALLEL CONNECTOR PINOUT

    Model 250 Parallel Port                     Host LPT Port
    Connector Pin Number                         Pin Number    
                                            
             1                                      11
             2                                       7
             3                                       8
             4                                       9
             5                                       2
             6                                      10
             7                                      12
             8                                      24
             9                                      23  
            10                                       6         
            11                                      13        
            12                                      23        
            13                                       3       
            14                                       4       
            15                                       5   
                                            
 The black pigtail (if present) connects to the shield only.

                                            
           FIGURE 3. POWER INPUT CONNECTOR PINOUT  

          

SECTION 2: OPERATION                         
                                             
   The software driver provided includes an executable file
and a source file for Microsoft QuickBASIC.  
   First make a backup copy of the support disk. You may want
to make a directory on your hard drive and copy the support
files into the directory. Your disk contains the following
files: 

DRIVR250.EXE  Executable driver software
DRIVR250.BAS  BASIC source code for above
DRIVR250.CFG  Configuration file
DRIVR250.QLB  Library for QuickBASIC (reg trdmrk) environment
DRIVR250.LIB  Stand-alone library 
250Axxxx.CAL  Self-calibration file         
FACTxxxx.CAL  Factory calibration file
FACTxxxx.CA~  Backup for factory calibration file
  
NOTE: Substitute the last four digits of your Model 250's
serial number for xxxx in the above calibration file names.

   The calibration files are specific to your particular Model
250. Be sure to make a back-up copy of your support disk. Set
the directory containing your support files as the current
directory. Type DRIVR250 from the DOS prompt. You should see
the Main Menu on the screen. 

Establishing Communications

Option 1)  Parallel Port -   Pressing the "1" key successively
cycles the parallel port address through three choices.
Parallel/monochrome cards usually use the 3BC port address.
LPT1 or LPT2 cards normally use either 378 or 278 (all
addresses are given in hexidecimal). If you are unsure of your
port address, many computers display the addresses of
installed ports when the computer is started. Otherwise, you
may need to check your documentation to determine the correct
parallel port address. Select option 2, Check Port, to verify
the integrity of the parallel link. The check should take less
than a minute to finish. When the Port Check finishes, you are
given the opportunity to manually set the port settling delay.
That delay is normally left at zero. For parallel cables
longer than 25 feet, or for extremely electrically noisy
environments, you may choose to increase the settling delay. A
settling delay of 1 should provide generous timing margins for
all but the most extreme circumstances. It may be practical to
run hundreds of feet of cable with longer settling delays. If
communications errors are detected by the port check itself,
the settling delay will be incremented and the test will be
repeated. If the communications check fails completely, first
recheck the port address. Then, double check the cable and
power connections.

Long-Term Calibration  

   Each Model 250 has two associated calibration files. The
FACTxxxx.CAL is a factory calibration file that must be loaded
each time DRIVR250 is run. 250Axxxx.CAL is a self-calibration
file that should be re-created every month for maximum
accuracy. You should not need to concern yourself with the
long-term calibration files at this time because your Model
250 has been pre-calibrated. The last active calibration file
is always loaded when starting DRIVR250. If you select option
3 you will see the name of the currently loaded calibration
file at the bottom of the screen. Press Esc 3 to return to the
Main Menu. See Page 12 for details on recalibration.

Polled Mode Overview

   After the communications have been established, select
Option 4, Polled Operation, from the Main Menu. You will see
the polled acquisition screen. Conversion results from the
selected A/D channel will scroll in the lower left corner of
the screen. The left hand number is the raw count from the A/D
converter. The count can vary from approximately -4 million to
+4 million. Next to the count is the equivalent voltage. Each
count represents just over one microvolt. 
   In the lower right are calculated figures for evaluating DC
performance. Maximum, mimimum and average values are given.
The difference between the maximum and minimum is also
displayed, labeled "delta". Pressing space resets the maximum,
minimum, and delta readings. The average is calculated for
successive blocks of 40 readings each. The standard deviation,
in millivolts, is calculated from the same sample. The
effective resolution (in bits) is 23 bits minus the RMS noise
expressed in bits.

   The top half of the screen shows the current operating
configuration. The following menu choices are available:

C)  Analog Input Channel -   Channels 0 through 7 are
available. Channels 0 through 5 are signal inputs from the
Analog input connector. Channel 6 is always connected to a
full-scale reference voltage and channel 7 is always connected
to zero volts. Channels 6 and 7 are used for self-calibration.
 
E)  External Sub-channel -   The A/D sub-channel code appears
at the pins labeled A, B, C, & D on the digital I/O connector.
If an external multiplexer or multiplexed amplifier is
connected, the sub-channel code will select the appropriate
channel on the multiplexer. The sub-channel code can be set
from 0 to 15. If no external device is connected to the analog
input channel, the external sub-channel selection will have no
effect on the voltage reading. The external sub-channel is set
to zero at power-up.

A) Remote Averaging -   The Model 250 can perform digital
averaging of 2, 4, 8, 16, 32, 64, or 128 samples. Remote
averaging is performed before the data is sent to the host
computer. In DC mode, the result will be the average of the
input voltage during the entire averaging period. Therefore,
all noise sources, including noise present in the signal
itself can be attenuated. In Track/hold mode, the input
voltage is sampled only once, even if many conversions are
averaged. Some noise reduction can still be achieved, but
effective resolution beyond 21 bits is unlikely. Under most
circumstances in Track/hold mode, there is no benefit in
averaging more than eight conversions.  

L) Local averaging -   Local averaging is performed in the
host computer, after data has been received but before it is
displayed. Best DC performance is usually obtained with a
mixture of remote and local averaging.

T) Track/hold -   Select either Track/hold or DC sampling.
Track/hold is needed for AC signals, DC mode offers better
noise performance, particularly with remote averaging. 

D) Digital input -   The digital input command reads an
unlatched 8-bit digital input word from pins 18 through 25 on
the digital input/output connector. The most recent result is
shown next to the "D" command on the polled operation screen.

U) Control OUtputs -   The digital output command puts a
latched 8-bit digital word at pins 6 through 13 on the digital
input/output connector. After pressing "U", enter the word to
output. These outputs are reset to zero at power-up.

K) ChecKsum -   The Model 250 keeps a running total of all
serial data transmitted. The total is kept in modulo 256 form,
ie., any carry out of an 8-bit binary word is discarded.
Therefore, the checksum is always a number from 0 to 255. The
host computer keeps a similar total for all received words.
The host can request the Model 250's checksum any time
communications are open. The host then compares the two values
to confirm that no communications errors have occurred. The
"Checksum OK" is not a 100% guarantee that no errors have
occurred since multiple errors could cancel in the checksum.
The more frequently the checksum is requested, the smaller the
chance that an error will go undetected.
  
S) System calibration.   The System calibration command first
selects channel 7 and obtains an offset voltage correction.
Then channel 6 is selected and a full-scale gain correction
factor is established. Finally, the original channel is
reselected. For maximum accuracy, the system calibration
should be performed regularly. Calibrations should be more
frequent during warm-up or during periods of rapid ambient
temperature change. You should generally recalibrate after
changing the mode or averaging settings.

O) Offset calibration.   The average current channel reading
is forced to zero volts. Normally channel 7 would be selected
before using this command. Note that if an offset calibration
is done on channel 6, subsequent readings would fall between
zero and -10 volts. 

   To verify function, press "C" and select analog input
channel 7. Because channel 7 is a dedicated zero channel, you
should see a voltage in the general vicinity of zero. Enter
"O" to initiate an Offset calibration. After the offset
calibration the voltage should read very close to zero. This
offset calibration removes errors caused by the input signal
conditioning circuitry as well as offset errors in the A/D
converter itself. Confirm that the reading is close to zero
volts. Press "C" and select A/D Channel "6". This channel is a
dedicated full-scale channel. Enter "S" to initiate a System
calibration. After the system calibration channel 6 should
read within 25 microvolts of +5 volts. 
 
   Now you are ready to connect an input signal to one of the
A/D input channels. A battery is a convenient voltage source
for checking the Model 250. Connect the positive and negative
ends of the battery to a pair of positive and negative analog
input pins on the analog input connector. (Pins 1 and 9,
respectively for channel 0). You will also need a wire from
one end (normally the negative) of the battery to ground at
the Model 250 to insure that the input voltage at both input
terminals is within 11 volts of ground. The ground at pin 15
is provided for the purpose. This third connection for common-
mode purposes allows more flexibility in connections, and
guarantees that ground loops can always be avoided. However,
it is easily overlooked, and its absence will cause erratic
readings. Enter "C" and select the input channel which you
have connected to the battery. A typical D cell will read
between 1.2 and 1.56 volts. Reverse the wires and note the
polarity change. Note that the plus sign is implicit and does
not appear. Connecting the input wires directly together will
cause a potential of zero volts. An open circuit will read
unpredictably. A positive overvoltage will read over 5 volts.
A negative overvoltage will read under -5 volts. Note that the
Model 250 can measure accurately to several millivolts above
+5 volts as well as to several millivolts below -5 volts.
   The analog input channels are protected against continuous
overvoltage up to 35 volts. With the initial settings from the
provided configuration file (DC mode, no averaging) the
effective resolution should be 19.5 to 20.5 bits.
   Because of extreme resolution possible with the Model 250
it is important to carefully shield your input signals from
electrical noise for best performance. If shielding is not
possible, equal length twisted pair signal wires are
recommended. Electrical noise can be radiated through the air
and picked up by wiring and/or circuitry. It can also be
introduced via the power connections. Also, moving air can
create sufficient thermal effects to cause degradation of
effective resolution. 
   You can experiment now with any of the commands. You cannot
harm the Model 250 by issuing random commands. As long as you
do not answer Yes to the "DO YOU WANT TO SAVE YOUR
CONFIGURATION" prompt when you exit the program, you can
always restart from the last saved set-up. If no configuration
file is present, you will begin from the standard
configuration.

Connecting Analog Inputs

            FIGURE 4: ANALOG INPUT CONNECTOR PINOUT

           PIN 8...+5V REF. OUTPUT
                                   PIN 15...GROUND
           PIN 7...REF. GROUND
                                   PIN 14...CHANNEL 5-
           PIN 6...CHANNEL 5+
                                   PIN 13...CHANNEL 4-
           PIN 5...CHANNEL 4+
                                   PIN 12...CHANNEL 3-
           PIN 4...CHANNEL 3+
                                   PIN 11...CHANNEL 2-
           PIN 3...CHANNEL 2+
                                   PIN 10...CHANNEL 1-
           PIN 2...CHANNEL 1+
                                   PIN 9....CHANNEL 0-
           PIN 1...CHANNEL 0+

Note:  For maximum protection, and lowest noise, any unused
       inputs should be connected to ground. This is done to
       protect the circuitry from static discharges which can
       be of extremely high voltage. Open inputs can also pick
       up noise. Strain-relief is recommended for all
       permanent wiring on the connector. Otherwise, physical
       stress may cause the failure of an electrical
       connection. The connector hood provided includes a
       strain-relief clamp. 

   Reference ground and 5 volts are brought out to the analog
connector to be used for cases where the system calibration
command is not sufficient, or for referencing external signal
conditioning circuitry. The 5 volt reference output is
independently buffered and can source or sink over 10
milliamps. Large capacitive loads may cause instabilities.
Dynamic loading on the +5 volt reference output may decrease
effective resolution. 

Digital Input/Output Commands

   The pin assignment for the digital inputs and outputs are
shown in Figure 4. The four optically isolated digital outputs
can be used to control Lawson Labs Model 17B, 20B, and 35B
multiplexers and multiplexed amplifiers. The optically
isolated lines work in reference to "Guard" (pin 5).

        FIGURE 5: DIGITAL INPUT/OUTPUT CONNECTOR PINOUT

    PIN 13...DIGITAL OUTPUT 7
                                       PIN 25...DIGITAL INPUT 7
    PIN 12...DIGITAL OUTPUT 6
                                       PIN 24...DIGITAL INPUT 6
    PIN 11...DIGITAL OUTPUT 5
                                       PIN 23...DIGITAL INPUT 5
    PIN 10...DIGITAL OUTPUT 4                               
                                       PIN 22...DIGITAL INPUT 4
    PIN 9...DIGITAL OUTPUT 3
                                       PIN 21...DIGITAL INPUT 3
    PIN 8...DIGITAL OUTPUT 2
                                       PIN 20...DIGITAL INPUT 2
    PIN 7...DIGITAL OUTPUT 1
                                       PIN 19...DIGITAL INPUT 1
    PIN 6...DIGITAL OUTPUT 0
                                       PIN 18...DIGITAL INPUT 0
    PIN 5...GUARD
                                       PIN 17...GROUND
    PIN 4...OUTPUT D
                                       PIN 16...GROUND
    PIN 3...OUTPUT C
                                       PIN 15...GROUND
    PIN 2...OUTPUT B
                                       PIN 14...GROUND
    PIN 1...OUTPUT A

Note:  Pins 1 through 4 are optically isolated digital
       outputs. They function relative to pin 5 only.

   Press Esc to return to the main menu from the polled mode
screen.

Scanning Mode

   Selecting option 5 from the main menu yields the scan mode
menus. There are three types of scanning available: single-
channel fast scanning, normal multi-channel scanning and
independent, time-stamped scanning. Fast scanning allows the
maximum data rate to be achieved. Most computers can keep up
with fast scanning rates in excess of 5 kHz. Normal and time-
stamped scanning are limited to a little over 2 kHz because
alternate zero and signal measurements are taken, allowing for
automatic zero drift suppression. Time-stamped scanning is
similar to normal scanning except it proceeds independently,
whether or not the host reads the data as it is taken. A means
is provided for the host to re-synchronize with the Model 250
without disturbing the acquisition process. Time-stamped
scanning mode is useful for situations where the host computer
cannot monitor the parallel port continuously. It is needed
because the Model 250's output buffer will fill quickly at
high data rates. 
   All scan types allow for Track/hold or DC operation. Remote
averaging is not available in Fast Single-channel mode.  
   Press T to toggle through the various scanning setup
screens. The four screens are described below. 

Fast Single-Channel Scan Mode

      Options 0 through 5 correspond to the six analog input
channels. After entering 0 - 5, you will be asked for the
external sub-channel code. This code is only significant if an
external multiplexer or other device is connected to the
optically isolated output port.

Option 6)  Inter-channel Delay-  This delay does not apply to
single-channel scanning and is omitted for fast scanning. See
below.

Option 7)  Scanning Rate -  Select Option 7 and enter the
desired rate. The high and low limits are shown. If you enter
a value outside the valid range, the nearest attainable rate
will be selected. Fast scanning rates can be from over 5 kHz
to under 250 Hertz.

Option 8) Number of scans -  Scanning will stop after a
keypress or after a pre-set number of scans have completed.
For simplicity, DRIVR250 limits the maximum number of samples
per iteration to 32766.

Option 9)  Triggering -   Three triggering modes are
available: Positive edge, negative edge, and none. If "none"
is selected, scanning will begin immediately upon issuing the
start scan command. Positive edge triggered scanning will not
begin until the Digital Input 7 (Digital I/O Connector pin 25)
switches from zero to 5 volts. Negative edge triggering waits
for the same input to pass from a high to a low state.
Multiple Model 250s can be synchronized if a single trigger
signal is used.
 
Enter) -  After pressing Enter, a brief calibration is done at
the current settings. Then you are asked to press a key to
begin. In triggered scanning, the keypress will enable the
trigger, but not actually begin the data collection. The Model
250 will wait indefinitely for the trigger signal. A keypress
while waiting period will cancel the scanning iteration.
    
Esc)   -  Press Esc to return  to the Main Menu.

Normal Scan Mode
 
   Normal Scanning is basically the same as Fast single-
channel scanning with the differences described below.

   Selections 0 through 5 correspond to the six A/D input
channels. With an external multiplexer connected, 1 to 96
channels can be selected for scanning. The A/D input channels
are displayed with the external control codes that are active
for that channel. From 1 to 16 sub-channels can be active for
each A/D channel. Any active subchannels must be contiguous.
After pressing the channel number, the user will be prompted
for the starting and ending sub-channels. If the ending sub-
channel code is lower than the starting sub-channel code, that
A/D channel will be skipped during scanning.  

Option 6)  Inter-channel Delay -  This delay allows extra
settling time after each channel selection. It can be set from
0 to 4351 in multiples of 17 microseconds. In general, with
low impedance signal sources, specified accuracy can be
obtained with a delay of 17 or higher. A noticeable
improvement may be realized with delays two or three times
that long. For very high impedance sources, much longer delays
may be necessary. Increasing the interchannel delay will
reduce the maximum achievable scanning rate.

Option 7)  Scanning Rate -   The valid range of Normal
Scanning rates is from 1 to over 2000 scans per second.   
The maximum allowed rate will depend on the number of channels
per scan and the inter-channel delay.

Time-stamped Scan Mode

   Time-stamped scanning gives the host computer flexibility
to perform other tasks without losing the continuity of the
acquisition process. The time stamp is the number of scans
begun since the start scan command was issued. It is
transmitted at the start of each scan. After 67,108,863 scans,
the time stamp rolls over to 0. Until that point, the elapsed
time is the product of the time stamp and the scan interval.
Longer intervals can be tracked by counting rollovers. 
   After starting time-stamped scanning, the host computer can
stop servicing the parallel port for long intervals. Data that
is not read from the port is lost, but the time-base is
maintained. Digital output commands can be issued without
disturbing scanning. During time-stamped scanning, the
checksum is used to verify each scan, so the Checksum request
should not be issued.
   A variation on time-stamped scanning is time-stamped
calibration scanning. It adds the full-scale calibration
channel as the first data point in each scan. This feature
allows the host to keep the gain calibration current over
extended scanning periods.       

Acquiring and Viewing Scanned Data

   After scanning is started, the scan status is displayed.
Any scanning sequence can be stopped at the end of the current
scan by pressing a key. Fast and normal scanning will stop,
regardless, after the designated number of scans. Time-stamped
scanning will continue indefinitely, overwriting older data
after the available memory has been filled. In time-stamped
mode, Pressing Esc cancels scanning immediately. The Model 250
will be reinitialized if a time-stamped scan is stopped with
Esc instead of another key. 
   After scanning, you can page through the data on the
screen. For multi-channel scanning, the external sub-channel
codes (CC) are listed vertically under headings for each of
the six analog input channels. Press space for subsequent
scans. Press Escape to return to the scanning menu.
   Press Esc again to return to the Main Menu.

Self-Calibration

  Your Model 250 is factory calibrated and that calibration
has been verified against a very stable 24-bit system. It is
possible that over time, aging effects will degrade the
monotonicity of the system. The self-calibration routine has
been provided to allow you to restore full accuracy at any
time. We recommend that you save your original calibration
file so that you will always have a baseline to return to. 
   Calibration should be performed after a 30 minute warm-up
period. Substantial care has gone into reducing the
temperature sensitivity of the calibration. However, best
results will be obtained if the calibration is done at the
approximate temperature expected during use. If extreme
ambient temperature fluctuations are expected (and maximum
accuracy is required), you may want to have a family of
current calibration files. Then, you can load the calibration
that corresponds to the current ambient temperature. 
   The self-calibration process generates a 4095-point
correction table. Under normal operating conditions, a monthly
recalibration should be sufficient. Any reasonably fast
computer should be able to complete a self-calibration in
under an hour.
   The last 4 digits of the Model 250's serial number are used
in the calibration file names so that multiple Model 250s can
be used on the same computer. The fourth character in the
self-calibration file name can be changed if you wish to keep
a family of calibration files accessible at the same time.   
From the Main Menu, select Option 3) Long-term Calibration.
You should see the name of the current calibration file at the
bottom of the screen. If desired, Select 1) to load a new
calibration file. As shipped, the ID code is the letter "A"
plus the last four digits of the serial number (found on the
bottom of the Model 250 itself). Remember that those four
digits are also used to locate the correct factory calibration
file. When DRIVR250 starts, it loads the current long-term
calibration file as well as the factory calibration file. The
current calibration file name is preserved when you save your
configuration.
   Option 2) performs the actual self-calibration and saves it
using the current active filename. If a file already exists
with that name, the original file will be renamed with a "~"
in place of the last character. The self-calibration process
may take almost an hour. The "test data" is displayed in the
lower right portion of the screen. It increments to hex FFF by
the end of the calibration. Press 3 to return to the Main
Menu.

FIGURE 6: EFFECT OF OPERATING MODE AND REMOTE AVERAGING ON
          EFFECTIVE RESOLUTION

                                                              
                                                              
* Effective resolution is defined as total resolution minus  
RMS noise in bits.                                             

SECTION 3: OPERATING SUGGESTIONS

   The Model 250 A/D card 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 A/D converter requires a vanishingly small input
current so the error caused by even very long wires is
negligible. For proper operation it is necessary that the
positive and negative inputs both be within 11 volts of
ground. For a floating voltage source, this is generally
accomplished by connecting a third wire between the Model 250
ground and a ground terminal at the source of the measured
voltage. Ground currents may flow in this wire, but the
resulting voltage drop will not cause a measurement error.
Redundant grounding can cause ground loops. Ground loops can
cause unpredictable behavior.
   High frequency common mode noise can reduce effective
resolution. A capacitor from the negative analog input
terminal to the pin 15 ground may help. A similar capacitor on
the positive input may be needed to balance the inputs. 

FIGURE 7: TYPICAL INPUT CONNECTIONS

* Remember to ground unused inputs
                                        
   Best results are obtained with filtered, buffered voltages.
Electrical noise travels through the air and can be picked up
by interconnecting wires. The first defense against noise is
shielding. Use shielded wire with the shield connected at one
or both ends to ground. (See above). The lower the impedance
of the voltage source, the less susceptible the wiring will be
to electrical noise. If noise problems persist, try to locate
the source of the interference and shield it. Electric motors,
electric heaters and flickering fluorescent lights are
potential sources of interference.

Digital Input and Output

   The digital input lines will accept signals from TTL or 5
volt CMOS logic. They will also work with contact closures to
ground. Inactive input pins are pulled up to 5 volts by 100K
resistors. The input voltage should not go above 5 volts or
below ground.

   The 8-bit digital output word is also 5 volt CMOS logic.
Each output can source or sink several milliamps.

CAUTION: The digital circuitry can be damaged if these lines
are pulled above 5 volts or below ground.

   The optically isolated output port is primarily intended
for controlling external input multiplexers and multiplexed
amplifiers.

       FIGURE 8: OPTICALLY ISOLATED DIGITAL OUTPUT CODE

  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

   Electrically, each output line is the collector of an
optically coupled NPN transistor whose emitter is connected to
guard. Note that guard is not connected to ground on the Model
250. The guard is usually connected to the external device's
ground. 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 is appropriate (the external supply can
be as high as 24 VDC). 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.

SECTION 4: USER'S TECHNICAL REFERENCE

   DRIVR250 software is intended to demonstrate the features of
the Model 250. It is not a general purpose data acquisition
package. The Model 250 software interface resides primarily in
the M250.QLB library. CALLS to the library are used to
configure and operate the Model 250. A summary is given below.
For more detail, please refer to the source listing,
DRIVR250.BAS.  

   The M250.QLB library processes a 16-bit command word. Also
passed (by long reference) are a long integer and an integer
variable. When a response is expected, the library returns a
long integer, RESPONSE&. The integer variable is used to report
any error conditions back to BASIC. Many commands that pass
data to the Model 250 include the data being sent in the least
significant 8 bits of the COMMAND word. After any COMMAND is
issued, the host should check that ERRORCODE% is equal to zero.
A non-zero value is an error code which will help to establish
the nature of the problem.

   The following commands require 8-bit data to be added to the
command word: 

ChannelCodeCMD% = &H100   select input channel (control code)
   valid data:   0 to 127
   The channel selected is defined by the data as follows: 
       CHANNEL% * 16 + SUBCHAN%
       CHANNEL% is the A/D input channel number:   0 to  7
       SUBCHAN% is the external expansion code:    0 to 15
       external multiplexers or multiplexed amplifiers are
       required in order to use the external control code

Example:  COMMAND% = ChannelCodeCMD% + CHANNEL% * 16 + SUBCHAN% 
          CALL M250(COMMAND%, RESPONSE&, ERRORCODE%) 
          IF ERRORCODE% <> 0 THEN GOTO ERRORTRAP          

DigitalOutCMD% = &H200                set digital output
   valid data:   0 to 255
   The data word appears at the 25-pin connector pins 6-13 

Example:  COMMAND% = DigitalOutCMD% + DIGOUTWORD%
          CALL M250 (COMMAND%, RESPONSE&, ERRORCODE%)
          IF ERRORCODE% <> 0 THEN GOTO ERRORTRAP

TrackHoldCMD% = &H300                set sampling mode
   valid data:   0 or 1 
   1 is track then hold, 0 is track only
   track only is usually refered to as "DC mode"

Example:  COMMAND% = TrackHoldCMD% + HOLD%
          CALL M250(COMMAND%, RESPONSE&, ERRORCODE%)
          IF ERRORCODE% <> 0 THEN GOTO ERRORTRAP

RemoteAvgCMD% = &H500      set number of samples to average
   valid data:   1, 2, 4, 8, 16, 32, 64, or 128

Example:   COMMAND% = RemoteAvgCMD% + AVERAGE%
           CALL M250(COMMAND%, RESPONSE&, ERRORCODE%)
           IF ERRORCODE% <> 0 THEN GOTO ERRORTRAP

ConvertCMD% = &H600                  get conversion command
   valid data:  0 to 127
   Data is the channel to select for the conversion in the same
   form as for the ChannelCode command.
   The conversion result is passed back as RESPONSE&

Example:  COMMAND% = ConvertCMD% + CHANNEL% * 16 + SUBCHAN% 
          CALL M250 (COMMAND%, RESPONSE&, ERRORCODE%)
          IF ERRORCODE% <> 0 THEN GOTO ERRORTRAP
          COUNT& = RESPONSE&

CalOffsetCMD% = &H7000             offset calibration
   valid data:  0 to 127 
   Data is the channel to select for the conversion in the same
   form as for the ChannelCode command.
   On entry, RESPONSE& is set based on the power of 2 of the
   number of samples to average. The valid range for POWER2% is
   0 - 9 (1 to 512 samples).  After this command is issued, the
   selected input channel will read 0 volts.

Example:  COMMAND% = CalOffsetCMD% + CHANNEL% * 16 + SUBCHAN% 
          RESPONSE& = 2 ^ POWER2% + (POWER2% * 65536)
          CALL M250(COMMAND%, RESPONSE&, ERRORCODE%)
          IF ERRORCODE% <> 0 THEN GOTO ERRORTRAP

CalFullScaleCMD% = &H6000       full scale calibration command
  
   The CalFullScale command is identical to the CalOffset above
   except that the average count is passed back in RESPONSE&.
   The actual scaling is done by the CALLing routine.

Example: COMMAND% = CalFullScaleCMD% + CHANNEL% * 16 + SUBCHAN%
         RESPONSE& = 2 ^ POWER2% + (POWER2% * 65536)
         CALL M250(COMMAND%, RESPONSE&, ERRORCODE%)
         A$ = INKEY$                 'absorb keystroke, if any
         IF ERRORCODE% <> 0 THEN GOTO ERRORTRAP

   The following commands request data from the Model 250, but
do not require data to be added to the command word. After the
CALL, RESPONSE& will contain the result.

VersionCMD% = 3          request version number from Model 250
   The version number is passed back as RESPONSE&

Example:  COMMAND% = VersionCMD%
          CALL M250(COMMAND%, RESPONSE&, ERRORCODE%)
          IF ERRORCODE% <> 0 THEN GOTO ERRORTRAP
          VERSION% = RESPONSE&

 DigitalInCMD% = 5            request digital input word
    The digital input status from the Digital I/O connector
    pins 18-25 is passed back as RESPONSE&

Example:  COMMAND% = DigitalInCMD%
          CALL M250(COMMAND%, RESPONSE&, ERRORCODE%)
          IF ERRORCODE% <> 0 THEN GOTO ERRORTRAP
          LASTDIGINP% = RESPONSE&

ChecksumCMD% = 4                     'verify checksum
   The Checksum command has no effect except on ERRORCODE%
   If ERRORCODE% = 0 then the data received since the last
   Checksum command are in all probability correct. Note that
   if checksum commands are not issued frequently, there is a
   small chance that multiple errors will cancel and no
   checksum error will be detected.

Example:  COMMAND% = ChecksumCMD%
          CALL M250(COMMAND%, RESPONSE&, ERRORCODE%)
          IF ERRORCODE% <> 0 THEN GOTO ERRORTRAP

   There are four DoScan commands. Each one initiates a
particular type of scanning sequence. The sequence must have
been previously defined using Set commands. Once the scan is
fully defined, a SendScan command should be issued. All
scanning modes write data into an array beginning at
DSTARTSEG%.
    The scanning commands pass an address into the library in
RESPONSE&. On entry, RESPONSE& is the starting segment for the
data array. On exit,  RESPONSE& is the number of scans
completed. Pressing the space bar during scanning will stop the
process. For time-stamped scanning, the Esc key will cancel
scanning in mid-scan. You may need to reset the Model 250 in
that event. 

DoStampCalScanCMD% = 2   start time-stamped scan w/calibration 
DoNormalScanCMD% = 6     start normal scan
DoStampScanCMD% = 7      start time-stamped scan 
DoFastScanCMD% = 8       start fast scan

   All DoScan commands are issued in the same way. The only
difference is the Command word itself.

Example:   COMMAND% = DoNormalScanCMD%
           RESPONSE& = DSTARTSEG%
           CALL M250(COMMAND%, RESPONSE&, ERRORCODE%)
           COMPLETESCANS = RESPONSE&   
           A$ = INKEY$       'absorb keystroke, if any 
           IF ERRORCODE% <> 0 THEN GOTO ERRORTRAP

ScanCalCMD% = 11               pre-scan calibration command
   On entry, RESPONSE& is set based on the power of 2 of the
   number of samples to average. The valid range for POWER2% is
   0 - 9 (1 to 512 samples). More averaging means better
   reproducibility, but longer calibration time.

Example:   COMMAND% = ScanCalCMD%
           RESPONSE& = 2 ^ POWER2% + (POWER2% * 65536)
           CALL M250(COMMAND%, RESPONSE&, ERRORCODE%)
           A$ = INKEY$            'absorb keystroke if any
           IF ERRORCODE% <> 0 THEN GOTO ERRORTRAP

PortTestCMD% = 10                   'parallel port test

   The PortTest command resets the Model 250 and checks the
function of the parallel port. It sends back the read/write
delay in RESPONSE&. The delay will be zero unless errors were
encountered. You can manually increase the delay for extra
timing margins. The read/write delay is initialized in the
SetPort command.

Example:   COMMAND% = PortTestCMD%
           CALL M250(COMMAND%, RESPONSE&, ERRORCODE%)
           IF ERRORCODE% <> 0 THEN GOTO ERRORTRAP
           RWDELAY% = RESPONSE&

   The Set commands pass scanning parameters to the M250 in
DATA1&. In some cases, additional data is sent in the low byte
of COMMAND%.

SetRateCMD% = &HC000
   The SetRate command establishes the scanning rate for fast
and normal scanning. See the SetStampRate command for time-
stamped scanning. DATA1& is set to reflect the scan interval.
the interchannel delay is added to the command word.

Example:   COMMAND% = SetRateCMD% + INTERCHAN%
           CALL M250(COMMAND%, DATA1&, ERRORCODE%)
           IF ERRORCODE% <> 0 THEN GOTO ERRORTRAP

 SetScanChannelsCMD% = &HD000
    This command specifies the active channels for multi-
channel scanning. A single 8-bit byte is written to each of 8
locations. The 8 locations are addressed by adding an index to
the command word. The valid index range is 0 through 7.
The first position is reserved for expansion. It must be set to
zero. The next 6 positions define the channel selection
sequence during the scan. DATA1& is derived from the channel
code sequence and is put at the location for that channel.
The 8th position is the total number of active data points. The
valid range for the total is 1 to 97. The 8 positions must all
be set before the scan configuration is sent to the Model 250.

Example:   FOR INDEX% = 0 to 5
             COMMAND% = SetScanChannelsCMD% + INDEX% + 1
             DATA1& = CHAN%(INDEX%)
             CALL M250(COMMAND%, DATA1&, ERRORCODE%)
             IF ERRORCODE% <> 0 THEN GOTO ERRORTRAP
           NEXT INDEX%

SetCalCMD% = &HC00     setup long-term calibration process 
StartCalCMD% = &HD00   start long term self-calibration
   These commands are not normally needed in application code
because long-term calibration need be done only monthly (or
even annually). We recommend using DRIVR250 itself for
calibration or using the DRIVER250 self-calibration subroutines
essentially intact.

SendSetupCMD% = &HE000
   The scanning information previously defined with Set
commands is sent in a block to the Model 250. Two other
parameters are also passed when the SendSetup command is
issued. The SendSetup command must be issued before a DoScan
command is sent. DATA1& = number of scans to complete           
(1 to 32766). For Time-stamped scanning DATA1& is the buffer
size (1 to 32766). The trigger type (TRIGGERTYPE%) is added to
the command word. Valid types are:       0 = no trigger
                                         1 = positive edge
                                         2 = negative edge

Example:  COMMAND% = SendSetupCMD% + TRIGGERTYPE%
          DATA1& = NUMNORMALSCANS
          CALL M250(COMMAND%, DATA1&, ERRORCODE%)
          IF ERRORCODE% <> 0 THEN GOTO ERRORTRAP

SetPortCMD% = &HF000       set parallel port address
   This command initializes the Read/write delay and the port
address and resets the Model 250. The read/write delay is
passed to the library in RESPONSE&. The port base address
(PORTADDR%) is added to the command word.

Example:    COMMAND% = SetPortCMD% + PORTADDR%
            RESPONSE& = RWDELAY%
            CALL M250(COMMAND%, RESPONSE&, ERRORCODE%)
            IF ERRORCODE% <> 0 THEN
              PRINT "Parallel Port not found "
              PRINT "Press any key to continue "
              A$ = INPUT$(1)
            END IF

SetStampRateCMD% = &HE00      set time-stamp scan rate
   The rate is determined by the interval between scans. That
interval is held in three bytes STAMPLO%, STAMPMID%, &
STAMPHI%. The low byte is added to the command word. The other
bytes are passed in DATA1&.

Example:   COMMAND% = SetStampRateCMD% + STAMPLO%
           DATA1& = STAMPMID% + STAMPHI% * &H100
           CALL M250(COMMAND%, DATA1&, ERRORCODE%)
           IF ERRORCODE% <> 0 THEN GOTO ERRORTRAP

GetCalFilesCMD% = &HA000    get long-term calibration and
                            factory calibration arrays          
   The library needs to load the correct .CAL files before the
Model 250 can perform as specified. Letter% is is an ascii code
available for housekeeping purposes. The original calibration
provided uses the letter "A". SERIALCODE% is derived from the
last 4 digits of the M250's serial number.

Example:   COMMAND% = GetCalFilesCMD% + Letter%
           RESPONSE& = SERIALCODE%
           CALL M250(COMMAND%, RESPONSE&, ERRORCODE%)
           IF ERRORCODE% <> 0 THEN GOSUB FileError  

GetStampScanCMD% = &H9000     get one scan during time-stamped
                              scanning
   After a DoStampScanCMD% or DoStampCalScanCMD% has been
issued, data is retrieved with the GetStampScan command.
On exit, RESPONSE& is a pointer used to locate data in the scan
buffer.                                           
 
Example:   COMMAND% = GetStampScanCMD%
           CALL M250(COMMAND%, RESPONSE&, ERRORCODE%)
           IF ERRORCODE% <> 0 THEN GOTO ERRORTRAP

EndStampScanCMD% = &H8000     end time stamp scanning
  This command stops time-stamped scanning. RESPONSE& returns a
  pointer into the scan buffer to locate the most recent data.

Example:   COMMAND% = EndStampScanCMD%
           CALL M250(COMMAND%, RESPONSE&, ERRORCODE%)
           IF ERRORCODE% <> 0 THEN GOTO ERRORTRAP
           RESPONSE& is the current scan buffer location

SECTION 5: TROUBLESHOOTING

1)  Can't reset the Model 250.

    A. Check parallel port address.
    B. Make sure that power is connected properly to the 250.
    C. Double-check your cable. If you are using an extender
       cable, are all lines extended?.
    
2)  Data appears random.

    A. Check channel selection and input cable pinout.
    B. Issue a checksum command to verify communications.
    C. Select channel 7 to verify conversion at zero volts.

3)  Data is consistent, but wrong.

    A. Do a system calibration.
    B. Check channel selection.
    C. Make sure another A/D input channel isn't badly over- 
       range.
    D. Make sure the correct .CAL file is loaded.

4)  Data is noisy.

    A. Increase filtering or digital averaging.
    B. Use DC mode if appropriate.
    C. Check shielding and grounding. Check that the DC common-
       mode range of +/-11 volts is being observed.
    D. Make sure another A/D input channel isn't badly over-
       range.
    E. An incorrect or missing long-term calibration file can
       cause excessive noise at certain voltages.
    F. Refer to OPERATING SUGGESTIONS a more complete
       discussion of noise issues.
  
5)  Optically isolated outputs are not working.

       Check connection to guard.

6)  Scanning fails, reporting a buffer overflow error.

    A. Slow down the scanning rate.
    B. Remove TSRs or interrupt driven options.
    C. Use time-stamped scanning mode. 

7)  QuickBASIC won't run DRIVR250.BAS  
 
    A. Missing command line switch  /AH
    B. Missing library switch       /L DRIVR250.QLB
    C. Library file is not in current directory.      

SECTION 6: INTERNAL ADJUSTMENTS

   Hardware calibration is set at the factory and should never
need adjustment. The software should always be able to
calibrate to yield peak accuracy. If you change any of the
adjustments, particularly numbers 3 or 4, you may not be able
to restore specified performance.

   FIGURE 9.  Location of Internal Adjustments

         

   There are four potentiometers on the board. Their functions
are as follows:                 
                                                   
1)  DC Common-mode rejection adjustment -   To reset the
common-mode adjustment first, connect the + and - input pins of
a channel to the +5 volt reference pin on the analog input
connector. Select that channel in polled mode. Adjust the
common-mode potentiometer for a reading of zero. Perform a
system calibration and then repeat for best results. 

2)  Gain adjustment -    The gain is set by connecting a known
voltage to an analog channel. Do a system calibration then
adjust the gain potentiometer to obtain the desired reading.
Repeat for best results. Note that the +5 volt reference on the
analog input connector will be affected by this adjustment.

3)  Residual Amplifier gain adjustment -   This adjustment is
factory set and should not be changed. Aging effects may
slightly change the gain of the residual amplifier, but that is
corrected for by the 4095-point software calibration. If this
potentiometer is too far out of adjustment, the software
calibration will run out of range.

4) DAC Buffer offset adjustment -   This adjustment is also
factory set for zero volts offset. Offset errors at this
amplifier are corrected for in the 4095-point calibration.   

SECTION 7: MODEL 250 SPECIFICATIONS

TYPE:                       23-bit successive approximation A/D
                            converter with parallel interface

MONOTONICITY:               22 bits

LINEARITY:                  0.0005% of full scale

DIFFERENTIAL INPUT RANGE:   +/- 5 volts
                            At least 150 millivolts of
                            over-voltage can be accommodated
                            without overranging.
                            No phase reversal occurs, even for
                            extreme over-voltages.

COMMON-MODE VOLTAGE RANGE:  +/- 11 volts

DC COMMON-MODE REJECTION:   96 dB minimum
    
INPUT IMPEDANCE:            100,000 megohms typical

ANALOG INPUTS:              6, fully differential, protected to
                            32 volts, expandable to 96 channels
                            using optional multiplexers

DIGITAL INPUTS:             8-bits, contact closure or 5-volt
                            CMOS or TTL logic compatible

DIGITAL OUTPUTS:            4 optically isolated lines plus 8 
                            latched logic outputs

POWER REQUIREMENT:          +15 VDC at 30 mA
                            -15 VDC at 20 mA
                            + 5 VDC at 10 mA  (with all digital
                            outputs OFF. Add 88 mA for all ON)
                            Standard supply requires for input
                            120 VAC +/- 10% at 60 Hertz   

SIZE:                       5 x 6.5 x 1 inches     board only
                            5.6 x 6.9 x 1.8 inches in enclosure 
                            3 x 4.8 x 2.6 inches   power supply

WEIGHT:                     3 Lbs.       Model 250 in enclosure
                            3 Lbs.       external power supply  

DATA RATE:                  Programmable, 3 points per hour to
                            over 5400 samples per second 

EFFECTIVE RESOLUTION:       Effective resolution is defined as
                            total resolution minus RMS noise in
                            bits. At 5 kHz, it is 19.5
                            bits. Digital averaging will yield
                            a maximum of 20 bits in Track/hold
                            mode. Effective resolution
                            approaches 23 bits in DC mode at 80
                            Hertz.        

PARALLEL INTERFACE:         4-bit buffered interface with error
                            checking. A bi-directional or high- 
                            speed port is not required. A 6- 
                            foot cable is provided for use with 
                            an LPT port.

OPERATING MODES:            The Model 250 can operate in polled
                            or scanning mode. In polled mode,   
                            individual readings are transmitted 
                            on request. In scanning mode, a     
                            pre-defined block of data is        
                            transmitted at a preset interval.   
                            Time-stamped scanning mode allows   
                            the Model 250 to proceed with data  
                            collection independent of the host
                            computer. Both polled and scanning
                            modes offer Track/hold or DC
                            operation.

SELF-CALIBRATION:           The Model 250 has extensive built-  
                            in self-calibration capabilities.   
                            Under software control, a 4095-
                            point calibration will restore full
                            accuracy.

                     LIMITED WARRANTY

     The Lawson Labs, Inc. Model 250 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.