PCIM-DAS1602/16 ANALOG & DIGITAL I/O BOARD for the PCI Bus User’s Manual Revision 2 © Copyright September, 2000
LIFETIME WARRANTY Every hardware product manufactured by Measurement Computing Corp. is warranted against defects in materials or workmanship for the life of the product, to the original purchaser. Any products found to be defective will be repaired or replaced promptly. LIFETIME HARSH ENVIRONMENT WARRANTYTM Any Measurement Computing Corp. product which is damaged due to misuse may be replaced for only 50% of the current price.
Table of Contents 1 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2. INSTALLATION & CONFIGURATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2.1 BASE I/O ADDRESS & INTERRUPT LEVEL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2.2 1/10 MHZ XTAL JUMPER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
This page is blank.
1 INTRODUCTION The PCIM-DAS1602/16 is a multifunction measurement and control board designed to operate in computers with PCI bus accessory slots. The architecture of the boards is loosely based on the original CIO-DAS16; the standard of ISA bus data acquisition. Much has changed due to improvements in technology. The PCIM-DAS1602/16 is easy to use. This manual will help you quickly and easily setup, install and test your board. We assume you already know how to open the PC and install expansion boards.
CB.CFG. This file is accessed by the Universal Library for programmers. Note also that the Universal Library is the I/O board interface for packaged applications such as SoftWIRE, and Agilent-VEE, therefore the InstaCal settings must be made in order for these and other applications to run. The base address and interrupt level are also stored in the system software.
2.4 BIPOLAR/UNIPOLAR AND GAIN SETTING The Bipolar or Unipolar configuration of the A/D converter is set by switch S2 (Figure 2-3). The switch controls all A/D channels. Though you cannot run some channels bipolar and some unipolar, you can measure a unipolar input in the bipolar mode. (e.g. you can monitor a 0 to 5V input with a +/-5 V channel) Figure 2-3. Bipolar/Unipolar Select Switch The input amplifier gain is selectable by software. 2.
Analog output is provided by two 12-bit multiplying D/A converters. This type of converter accepts a reference voltage and provides an output proportional to that. The proportion is controlled by the D/A output code (0 to 4095). Each bit represents 1/4096 of full scale. A precision −5V and −10V reference provide onboard D/A ranges of 0 to 5V, 0 to 10V, +/-5V, +/-10V.
2.8 TESTING THE INSTALLATION After you have run the install program, it is time to test the installation. The following section describes the InstaCal procedure to test that your board is properly installed. The procedure has you connect one of the output channels to one of the A/D channels, it then outputs a simple waveform and shows you the waveform monitored on the selected A/D channel. 1. With InstaCal running, select the PCIM-DAS1602/16. 2. Select the "TEST" function from the main menu 3.
3 SOFTWARE There are three common approaches for generating operating software for the PCIM-DAS1602/16. These are: Writing custom software with our Universal Library package, Using a fully integrated software package such as SoftWIRE, or Doing direct, register-level programming. 3.1 CUSTOM SOFTWARE USING THE UNIVERSAL LIBRARY Some users write custom software using our Universal Library.
4 CONNECTOR PIN OUTS 4.1 MAIN CONNECTOR DIAGRAM The PCIM-DAS1602/16 analog connector is a 37-pin “D” connector accessible from the rear of the PC on the expansion back plate. An additional signal, SS&H OUT (Simultaneous Sample and Hold Output), is available at pin 26. It is required when the CIO-SSH16 card is used with a PCIM-DAS1602/16 (Figure 4-1). Figure 4-1.
4.2 DIGITAL I/O CONNECTOR The digital I/O connector is mounted at the rear of the PCIM-DAS1602/16 and will accept a 40-pin header connector. The optional BP40-37 cable assembly brings the signals to a back plate with a 37-pin male connector mounted in it. When connected through the BP40-37, the PCIM-DAS1602/16 digital connector is identical to the CIO-DIO24 connector. The pinouts of the 40-pin digital I/O connector and BP40-37 cable are shown in Figure 4-2 below.
5 ANALOG CONNECTIONS 5.1 ANALOG INPUTS Analog signal connection is one of the most challenging aspects of applying a data acquisition board. If you are an Analog Electrical Engineer then this section is not for you, but if you are like most PC data acquisition users, the best way to connect your analog inputs may not be obvious.
C H IN ~ + V s + V g2 - Vg 1 Vs LL G ND Inp ut Amp To A /D - g2 g1 A n y v olta ge differe ntial be tw een ground s g1 an d g2 sho w s up a s a n error sig nal at the inp ut am plifier S in gle -e n de d inp ut w ith C o m m o n M od e Volta g e Figure 5-1b. Single-Ended Voltage Input Theory Differential Inputs Differential inputs measure the voltage between two distinct input signals.
~ CH High Vs CH Low Vcm g1 + Vs Vcm = Vg2 - Vg1 Inp ut Amp To A/D - LL G ND g2 Com m on M ode Voltage (Vcm ) is ignored by differential input configuration. However, note that Vcm + Vs must rem ain w ithin the am plifier’s comm on m ode range of ±10V D ifferential Input Figure 5-2b. Differential Input Theory Before moving on to the discussion of grounding and isolation, it is important to explain the concepts of common mode, and common mode range (CM Range).
5.1.2 System Grounds and Isolation There are three scenarios possible when connecting your signal source to your PCIM-DAS1602/16 board. 1. The PCIM-DAS1602/16 and the signal source have the same (or common) ground. This signal source can be connected directly to the PCIM-DAS1602/16. 2. The PCIM-DAS1602/16 and the signal source have an offset voltage between their grounds (AC and/or DC). This offset it commonly referred to a common mode voltage.
If you cannot obtain a reasonably stable DC voltage measurement between the grounds, or the voltage drifts around considerably, the two grounds are most likely isolated. The easiest way to check for isolation is to change your voltmeter to it’s ohm scale and measure the resistance between the two grounds. It is recommended that you turn both systems off prior to taking this resistance measurement.
NOTE Relying on the earth prong of a 120VAC for signal ground connections is not advised.. Different ground plugs may have large and potentially even dangerous voltage differentials. Remember that the ground pins on 120VAC outlets on different sides of the room may only be connected in the basement. This leaves the possibility that the “ground” pins may have a significant voltage differential (especially if the two 120VAC outlets happen to be on different phases.
5.2.1 Common Ground / Single-Ended Inputs Single-ended is the recommended configuration for common ground connections. However, if some of your inputs are common ground and some are not, we recommend you use the differential mode. There is no performance penalty (other than loss of channels) for using a differential input to measure a common ground signal source. However the reverse is not true.
5.2.3 Common Mode Voltage < +/-10V / Single-Ended Inputs This is not a recommended configuration. In fact, the phrase common mode has no meaning in a single-ended system and this case would be better described as a system with offset grounds. You can try this configuration, no system damage should occur and you may receive acceptable results. 5.2.4 Common Mode Voltage < +/-10V / Differential Inputs Systems with varying ground potentials should always be monitored in the differential mode.
Iso latio n B arrie r on co m m L ar ge od e vo lta ge gn al m n si bo ar d be tw eeur ce & A /D so GND C H H igh + In p u t Amp C H Low To A /D - 10 K LL G N D W hen the voltage difference betw een signal source and A /D board ground is large enough so the A /D board’s com m on m ode range is exceeded, isolated signal conditioning m ust be added. I/O C o nn ec tor A /D B o a rd 1 0 K is a re c o m m e n d e d v a lu e .
5.2.7 Isolated Grounds / Differential Inputs Optimum performance with isolated signal sources is assured with the use of the differential input setting. Figure 5-10 below shows the recommend connections is this configuration. e l S o u rc a rd S ig n a n d A /D B o o la te d . a y Is d a e lr A GND C H H igh + Inp ut Amp C H L ow To A /D - 10 K LL G N D I/O C o nn ec tor T he se g ro u n ds are e lec trica lly isolated . A /D B o a rd 1 0 K is a rec o m m e nd e d v a lue .
Bipolar/Unipolar Select Jumpers D/A0 & D/A1 Range Jumper Block Figure 5-11.
6 REGISTER ARCHITECTURE 6.1 OVERVIEW PCIM-DAS1602/16 operation registers are mapped into I/O space. Unlike ISA bus designs, this board has several base address regions, each corresponding to a reserved block of addresses in I/O space. Of the six Base Address Regions (BADRs) available per the PCI 2.1 specification, five are implemented in this design and are summarized in Table 6-1 as follows. I/O Region BADR0 BADR1 BADR2 BADR3 BADR4 Table 6-1.
LINTE = 1, on the local side interrupt is enabled LINTE = 0, on the local side interrupt is disabled the INT bit is read only INT = 1, interrupt is active INT = 0, interrupt is not active PCINTE = 1, on the PCI side, the interrupt is enabled PCINTE = 0, on the PCI side, the interrupt is disabled You must set both PCINTE and LINTE to 1 to enable interrupts. There is also an interrupt enable bit (INTE) in BADR3+4. This bit must also be set to 1 to enable interrupts.
Unipolar Mode: Straight Binary Coding 0000 h = −FS (0V) 7FFFh = Mid-scale (+FS/2) FFFFh = +FS − 1LSB WRITE Writing to this register is only valid for SW initiated conversions. The ADC Pacer source must be set to software polled (see BADR3 + 5). A null write to BADR2 + 0 will begin a single conversion. Conversion status may be determined by polling the EOC bit in BADR3 + 2.
6.
MAIN CONNECTOR DIGITAL I/O REGISTER BADR3 + 1 READ 7 6 0 0 5 4 3 2 1 0 0 0 DI3 DI2, CTR0 GATE DI1 DI0, EXT TRIG, EXT PACER, EXT GATE The signals present at the inputs are read as one byte, the most significant 4 bits of which are always zero. Digital Inputs 2 and 0 have multiple functions. Digital Input 2 may also be used as the gate to Counter 1 of the 82C54 which is available on the Main connector, please see BADR3+6 for a more detailed description.
MA3, MA2, MA1, and MA0 is a binary number between 0 and 15 indicating the MUX channel currently selected and is valid only when EOC = 0. The channel MUX increments shortly after EOC = 1 so may be in a state of transition when EOC = 1. ADC CONVERSION STATUS REGISTER BADR3 + 3 READ ONLY 7 6 5 4 EOC EOB EOA FNE 3 FHF 2 OVERRUN 1 0 0 0 EOC = 1, the A/D converter is busy. EOC = 0, it is free. EOC is in both BADR3+2 and BADR3+3 for convenience in software programming.
EOA_INT_SEL = 1, Interrupt on end of acquisition EOA_INT_SEL = 0, No interrupt on end of acquisition EOA_INT_SEL is used in conjunction with the residual counter. See BADR3+ 0Dh EOA = 1, the residual # of samples have been written to the FIFO EOA = 0, the residual # of samples have not been written to the FIFO EOA is cleared by writing a 0 to the INT bit. See below.
GATE_POL = 1, the trigger / gate polarity is set to negative-going edge / low level for non burst mode and positive-going edge / high level for burst mode GATE_POL = 0, the trigger / gate polarity is set to positive-going edge / high level for non burst mode and negative-going edge / low level for burst mode on a read, GATE_STATUS = 1, the gate to the internal pacer is on. GATE_STATUS = 0, the gate to the internal pacer is off.
PROGRAMMABLE GAIN CONTROL REGISTER BADR3 + 7 READ/WRITE 7 X 6 X 5 X 4 X 3 X 2 X 1 G1 0 G0 G[1:0] control the gain of the programmable gain amplifier according to the table below. G1 0 0 1 1 G0 0 1 0 1 BIPOLAR RANGE +/-10V +/-5V +/-2.5V +/-1.25V UNIPOLAR RANGE 0 to 10V 0 to 5V 0 to 2.5V 0 to 1.25V The mode, unipolar or bipolar is controlled by a switch. This makes the PCIM-DAS1602/16 compatible with the CIO-DAS1602/16.
USER COUNTER CLOCK CONTROL BADR3 + 0Ch READ/WRITE 7 X 6 X 5 X 4 X 3 X 2 X 1 X 0 CTR1_CLK_SEL CTR1 _CLK_SEL = 1. The onboard 100 kHz clock signal is ANDed with the COUNTER 1 CLOCK INPUT (pin 21). A high on pin 21 will allow pulses from the onboard source into the 8254 Counter 1 input. (This input has a pull-up resistor on it, so no connection is necessary to use the onboard 100 kHz clock. CTR1_CLK_SEL = 0, The input to 8254 Counter 1 is entirely dependent on pulses at pin 21, COUNTER 1 CLOCK INPUT.
3. You will get the EOA interrupt. Write a 03h to BADR3+4, read 20 samples from FIFO, and then write another 03h to BADR3+4. Total number of samples is greater than 512, but less than 1024 1. Before you start the acquisition, write the total number of samples to the residual counter, an 87h to BADR3+4 ( INTE, EOA_INT_SEL, and FIFO_HALF FULL enabled), and a 67h to BADR1+4Ch (INTE and PCINTE enabled). 2. Start the acquisition 3. The first interrupt you get will be the FIFO_HALF FULL interrupt.
2. You will get a FIFO_HALF FULL interrupt. Read 512 samples from FIFO and write an 83h to BADR3+4. 3. You will get another FIFO_HALF FULL interrupt. This is the second to last FIFO_HALF FULL interrupt so first read another 512 samples from FIFO and then write an 87h to BADR3+4. 4. You will get a third and final FIFO_HALF FULL interrupt. Read 512 samples from FIFO and write a 87h to BADR3+4. 5. Then you will get the EOA interrupt.
82C55 PORT A DATA BADR4 + 0 READ/WRITE 7 6 A7 A6 5 A5 4 A4 3 A3 2 A2 1 A1 0 A0 5 B5 4 B4 3 B3 2 B2 1 B1 0 B0 82C55 PORT B DATA BADR4 + 1 READ/WRITE 7 B7 6 B6 Ports A and B may be programmed as input or output. Each is written to and read from in bytes, although for control and monitoring purposes, individual bits are used. Bit set/reset and bit read functions require that unwanted bits be masked out of reads and ORed into writes.
82C55 CONTROL REGISTER BADR4 + 3 WRITE 7 MS 6 M3 5 M2 4 A 3 CU 2 M1 1 B Group B Group A 0 CL The 8255 can be programmed to operate in Input/ Output (mode 0), Strobed Input/ Output (mode 1) or Bi-Directional Bus (mode 2). When the PC is powered up or RESET, the 8255 is reset. This places all 24 lines in Input mode and no further programming is needed to use the 24 lines as TTL inputs. To program the 82C55 for other modes, assemble the following control code byte into an 8-bit byte. MS = Mode Set.
7 CALIBRATION AND TEST Every board is fully tested and calibrated before leaving the factory. For normal environments a calibration interval of six months to one year is recommended. If frequent variations in temperature or humidity are common, recalibrate at least every three months. It requires less than 20 minutes to calibrate the PCIM-DAS1602/16. 7.
8 ANALOG ELECTRONICS 8.1 VOLTAGE DIVIDERS If you wish to measure a signal which varies over a range greater than the input range of an analog or digital input, a voltage divider can drop the voltage of the input signal to the level the analog or digital input can measure. A voltage divider applies Ohm's law, which states, Voltage = Current * Resistance ( V = I * R) and Kirkoff's voltage law which states, The sum of the voltage drops around a circuit will be equal to the voltage drop for the entire circuit.
inputs. The voltage must be dropped to 5 volts max when on. The Attenuation is 24:5 or 4.8. Use the equation above to find an appropriate R1 if R2 is 1K. Remember that a TTL input is 'on' when the input voltage is greater than 2.5 volts. IMPORTANT NOTE: The resistors, R1 and R2, are going to dissipate all the power in the divider circuit according to the equation Current = Voltage / Resistance. The higher the value of the resistance (R1 + R2) the less power dissipated by the divider circuit.
9 SPECIFICATIONS Typical for 25°C unless otherwise specified. Power Consumption +5V quiescent 820mA typical, 1.
Accuracy Typical Accuracy Absolute Accuracy Accuracy Components Gain Error Offset Error PGA Linearity Error Integral Linearity Error Differential Linearity Error ±2.3 LSB ±5.0 LSB Trimmable by potentiometer to 0 Trimmable by potentiometer to 0 ±1.3 LSB typ , ±10.0 LSB max ±0.5 LSB typ , ±3.0 LSB max ±0.5 LSB typ, ±2.0 LSB max Each PCIM-DAS1602/16 is tested at the factory to assure the board’s overall error does not exceed ±5 LSB.
Crosstalk Crosstalk is defined here as the influence of one channel upon another when scanning two channels at the specified per channel rate for a total of 50000 samples. A full scale 100Hz triangle wave is input on Channel 1. Channel 0 is tied to Analog Ground at the 100 pin user connector. The table below summarizes the influence of Channel 1 on Channel 0 and does not include the effects of noise. Crosstalk Range ±10.000V ±5.000V ±2.500V ±1.250V 0V to +10.000V 0V to +5.000V 0V to +2.500V 0V to +1.
Accuracy Typical Accuracy Absolute Accuracy ±1 LSB ±2 LSB Accuracy Components Gain Error Offset Error Integral Linearity Error Differential Linearity Error Trimmable by potentiometer to 0 Trimmable by potentiometer to 0 ±0.5 LSB typ, ±1 LSB max ±0.5 LSB typ, ±1 LSB max Total board error is a combination of Gain, Offset, Differential Linearity and Integral Linearity error. The theoretical absolute accuracy of the board may be calculated by summing these component errors.
Counter Section *Note: Pins 21, 24, and 25 are pulled to logic high via 10K resistors.
Main Connector and Pin Out Connector type Connector Compatibility 37 pin male “D” connector Identical to CIO-DAS1602/16 Connector Differential Analog Input Mode: Pin Signal Name 1 +5V PC BUS POWER 2 CTR 1 OUT 3 DIG OUT 3 4 DIG OUT 1 5 DIG IN 3 6 DIG IN 1 7 DIG GND 8 −5V REF OUT 9 D/A 0 OUT 10 D/A0 REF IN 11 CH7 LO 12 CH6 LO 13 CH5 LO 14 CH4 LO 15 CH3 LO 16 CH2 LO 17 CH1 LO 18 CH0 LO 19 AGND Pin 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 Signal Name CTR 3 OUT CTR 1 CLOCK IN DIG OUT 2 DIG OUT 0
Digital Input / Output Connector and Pin Out Connector Type Connector Compatibility Pin 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 40-pin header Identical to CIO-DAS1602/16 Connector Signal Name NC NC PORT B 7 PORT B 6 PORT B 5 PORT B 4 PORT B 3 PORT B 2 PORT B 1 PORT B 0 DIG GND NC DIG GND NC DIG GND NC DIG GND +5V PC BUS POWER DIG GND NC Pin 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 43 Signal Name +5V PC BUS POWER DIG GND PORT C 7 PORT C 6 PORT C 5 PORT C 4 PORT C 3 PORT C 2
For your notes.
EC Declaration of Conformity We, Measurement Computing Corp.
Measurement Computing Corporation 16 Commerce Boulevard, Middleboro, MA 02346 Telephone: (508) 946-5100 Fax: (508) 946-9500 E-mail: info@MeasurementComputing.com www. MeasurementComputing.