Pci 1711
Pci 1711
Pci 1711
This documentation and the software included with this product are
copyrighted 1999 by Advantech Co., Ltd. All rights are reserved.
Advantech Co., Ltd. reserves the right to make improvements in the
products described in this manual at any time without notice.
No part of this manual may be reproduced, copied, translated or
transmitted in any form or by any means without the prior written
permission of Advantech Co., Ltd. Information provided in this
manual is intended to be accurate and reliable. However, Advantech
Co., Ltd. assumes no responsibility for its use, nor for any infringe-
ments of the rights of third parties which may result from its use.
Acknowledgments
PC-LabCard is a trademark of Advantech Co., Ltd. IBM and PC are
trademarks of International Business Machines Corporation. MS-
DOS, Windows, Microsoft Visual C++ and Visual BASIC are trade-
marks of Microsoft Corporation. Intel and Pentium are trademarks of
Intel Corporation. Delphi and C++Builder are trademarks of Inprise
Corporation.
CE notification
The PCI-1711/1731, developed by ADVANTECH CO., LTD., has
passed the CE test for environmental specifications when shielded
cables are used for external wiring. We recommend the use of
shielded cables. This kind of cable is available from Advantech.
2. Installation ..................................................... 7
2.1 Unpacking ............................................................................ 7
2.2 Driver Installation ................................................................ 8
2.3 Hardware Installation .......................................................... 9
2.4 Device Setup & Configuration .......................................... 12
2.5 Device Testing ................................................................... 15
5. Calibration ................................................... 29
5.1 VR Assignment ................................................................... 29
5.2 A/D Calibration .................................................................. 30
5.3 D/A Calibration .................................................................. 30
5.4 Self A/D Calibration ........................................................... 31
Appendix A
Specifications ................................................. 33
Appendix B
Block Diagram ................................................ 35
Appendix C
Register Structure and Format .................... 37
C.1 Overview ............................................................................ 37
C.2 I/O Port Address Map ........................................................ 37
C.3 Channel Number and A/D Data — BASE+0 and
BASE+1 .............................................................................. 42
C.4 Software A/D Trigger — BASE+0 .................................... 42
C.5 A/D Channel Range Setting — BASE+2 ......................... 43
C.6 MUX Control — BASE+4 and BASE+5 ............................ 44
C.7 Status Register — BASE+6 and BASE+7 ......................... 45
C.8 Control Register — BASE+6 ............................................. 46
C.9 Clear Interrupt and FIFO — BASE+8 and BASE+9 ......... 47
C.10 D/A Output Channel 0 — BASE+10 and BASE+11 ......... 47
C.11 D/A Output Channel 1 — BASE+12 and BASE+13 ......... 48
C.12 D/A Reference Control —BASE+14 ................................ 49
C.13 Digital I/O Registers — BASE+16 and BASE+17 ............ 50
C.14 Programmable Timer/Counter Registers BASE+24,
BASE+26, BASE+28 and BASE+30 ................................. 50
Appendix D
82C54 Counter Function ............................... 51
D.1 The Intel 82C54 .................................................................. 51
D.2 Counter Read/Write and Control Registers ..................... 51
D.3 Counter Operating Modes ................................................ 53
D.4 Counter Operations ........................................................... 55
1. Introduction
Chapter 1
Chapter 1
Thank you for buying the Advantech PCI-1711/1731 PCI card. The
Advantech PCI-1711/1731 is a powerful data acquisition (DAS) card for
the PCI bus. It features a unique circuit design and complete functions
for data acquisition and control. PCI-1711/1731 provides specific
functions for different user requirements:
PCI-1711 12-bit Low-cost Multifunction DAS card
PCI-1731 12-bit Low-cost Multifunction DAS card w/o analog output
The following sections of this chapter will provide further information
about features of the DAS cards, a Quick Start for installation, together
with some brief information on software and accessories for the PCI-
1711/1731 card.
1.1 Features
The Advantech PCI-1711/1731 provides users with the most requested
measurement and control functions as seen below:
q 16-channel Single-Ended A/D Input
q 12-bit A/D conversion with up to 100 kHz sampling rate
q 16-channel Digital Input
q 16-channel Digital Output
q 2-channel D/A Output (only for PCI-1711)
q Programmable Counter/Timer
q Automatic Channel/Gain Scanning
Plug-and-Play Function
The Advantech PCI-1711/1731 is a Plug-and-Play device, which fully
complies with the PCI Specification Rev 2.1. During card installation, all
bus-related configurations such as base I/O address and interrupts are
conveniently taken care of by the Plug-and-Play function. You have
virtually no need to set any jumpers or DIP switches.
Note:
✎ Pace trigger determines how fast A/D conversion will be done in pacer
trigger mode.
✎ For detailed specifications of the PCI-1711/1731, please refer to Appen-
dix A, Specifications.
1.3 Software
Advantech offers a rich set of DLL drivers, third-party driver support
and application software to help fully exploit the functions of your
PCI-1711/1731 card:
l DLL driver (on the companion CD-ROM)
l Labview driver
l Advantech ActiveDAQ
l Advantech GeniDAQ
1.4 Accessories
Advantech offers a complete set of accessory products to support the
PCI-1711/1731 cards. These accessories include:
Wiring Cable
q PCL-10168 The PCL-10168 shielded cable is specially designed
for PCI-1711/1731 cards to provide high resistance to noise. To
achieve a better signal quality, the signal wires are twisted in such a
way as to form a “twisted-pair cable”, reducing crosstalk and noise
from other signal sources. Furthermore, its analog and digital lines
are separately sheathed and shielded to neutralize EMI/EMC
problems.
Wiring Boards
q ADAM-3968 The ADAM-3968 is a 68-pin SCSI wiring terminal
module for DIN-rail mounting. This terminal module can be readily
connected to the Advantech PC-Lab cards and allow easy yet
reliable access to individual pin connections for the PCI-1711/1731
card.
output
l Reserved space on the board to meet future needs for signal-
reliable connections.
2.1 Unpacking
After receiving your PCI-1711/1731 package, please inspect its
contents first. The package should contain the following items:
þ PCI-1711/1731 card
þ Companion CD-ROM (DLL driver included)
þ User’s Manual
þ Quick Start
The PCI-1711/1731 card harbors certain electronic components
vulnerable to electrostatic discharge (ESD). ESD could easily damage
the integrated circuits and certain components if preventive measures
are not carefully paid attention to. Before removing the card from the
antistatic plastic bag, you should take following precautions to ward
off possible ESD damage:
l Touch the metal part of your computer chassis with your hand
Note:
✎ Keep the antistatic bag for future use. You might need the original bag
to store the card if you have to remove the card from PC or transport it
elsewhere.
Note:
✎ If the autoplay function is not enabled on your computer, use Windows
Explorer or Windows Run command to execute SETUP.EXE on the
companion CD-ROM.
Note:
✎ Make sure you have installed the driver first before you install the card
(please refer to 2.2 Driver Installation)
Note:
✎ In case you installed the card without installing the DLL driver first,
Windows 95/98 will recognize your card as an “unknown device” after
reboot, and will prompt you to provide necessary driver. You should
ignore the prompting messages (just click the Cancel button) and set
up the driver according to the steps described in 2.2 Driver Installa-
tion.
Note:
✎ If your card is properly installed, you should see the device name of
your card listed on the Device Manager tab. If you do see your device
name listed on it but marked with an exclamation sign “!” (Fig. 2-4), it
means your card has not been correctly installed. In this case, remove
the card device from the Device Manager by selecting its device name
and press the Remove button. Then go through the driver installation
process again.
Fig. 2-4 The “exclamation mark” (!) on the device name indicating
improper installation of the card
Advantech Co., Ltd. – 11 – PCI-1711/1731 User’s Manual
www.advantech.com
Chapter 2
After your card is properly installed on your system, you can now
configure your device using the Device Installation Program that has
itself already been installed on your system during driver setup. A
complete device installation procedure should include device setup,
configuration and testing. The following sections will guide you
through the Setup, Configuration and Testing of your device.
Step 4: Scroll down the List of Devices box to find the device that you
wish to install, then click the Install button to evoke the
Device(s) Found dialog box such as one shown in Fig. 2-8.
The Device(s) Found dialog box lists all the installed devices
on your system. Select the device you want to configure from
the list box and press the OK button. After you have clicked
OK, you will see a Device Setting dialog box such as the one in
Fig. 2-9.
Step 5: On the Device Setting dialog box (Fig. 2-9), you can configure
the voltage source either as External or Internal, and specify
the voltage output range for the 2 D/A channels.
Note:
✎Users can configure the source of D/A reference voltage either as
Internal or External, and select the output voltage range. When
selecting voltage source as Internal, users have two options for the
output voltage range : 0 ~ 5V and 0 ~ 10V.
When selected as External, the output voltage range is determined by
the external reference voltage in the following way :
By inputting an external reference voltage: -xV , where |x| <= 10,
you will get a output voltage range: 0 to xV.
Step 6: After you have finished configuring the device, click OK and
the device name will appear in the Installed Devices box as
seen below:
Fig. 2-10 The Device Name appearing on the list of devices box
Note:
✎ As we have noted, the device name “000:PCI-1711 I/O=6500H”
begins with a device number “000”, which is specifically assigned to
each card cifically. The device number is passed to the driver to specify
which device you wish to control.
If you want to test the card device further, go right to the next section
on the Device Testing.
Fig. 2-11 Analog Input tab on the Device Test dialog box
On the Device Test dialog box, users are free to test various functions
of PCI-1711/1731 on the Analog input, Analog output, Digital input,
Digital output or Counter tabs.
Note:
✎You can access the Device Test dialog box either by the previous
procedure for the Device Installation Program or simply by accessing
Start/Programs/Advantech Driver for 95 and 98 (or for NT) /Test
Utility.
Fig. 2-12 Analog Input tab on the Device Test dialog box
Fig. 2-13 Analog Output tab on the Device Test dialog box
Fig. 2-14 Digital Input tab on the Device Test dialog box
Fig. 2-15 Digital Output tab on the Device Test dialog box
Fig. 2-16 Digital output tab on the Device Test dialog box
Only after your card device is properly set up, configured and tested,
can the device installation procedure be counted as complete. After
the device installation procedure is completed, you can now safely
proceed to the next chpater, Signal Connections.
3.1 Overview
Maintaining signal connections is one of the most important factors in
ensuring that your application system is sending and receiving data
correctly. A good signal connection can avoid unnecessary and
costly damage to your PC and other hardware devices. This chapter
provides useful information about how to connect input and output
signals to the PCI-1711/1731 via the I/O connector.
Pin Assignment
Figure 3-1 shows the pin assignments for the 68-pin I/O connector on
the PCI-1711/1731.
Note:
✎ The three ground references AIGND, AOGND, and DGND should be
used discreetly each according to its designated purpose.
A I0 68 34 A I1
A I2 67 33 A I3
A I4 66 32 A I5
A I6 65 31 A I7
A I8 64 30 A I9
A I1 0 63 29 A I11
A I1 2 62 28 A I1 3
A I1 4 61 27 A I1 5
A IG N D 60 26 A IG N D
*D A 0 _ R E F 59 25 D A1_R EF *
* D A0_O U T 58 24 D A 1_O U T*
* AOGND 57 23 AOGND *
D I0 56 22 D I1
D I2 55 21 D I3
D I4 54 20 D I5
D I6 53 19 D I7
D I8 52 18 D I9
D I1 0 51 17 D I11
D I1 2 50 16 D I1 3
D I1 4 49 15 D I1 5
DGND 48 14 DGND
DO0 47 13 DO1
DO2 46 12 DO3
DO4 45 11 DO5
DO6 44 10 DO7
DO8 43 9 DO9
D O 10 42 8 D O 11
D O 12 41 7 D O 13
D O 14 40 6 D O 15
DGND 39 5 DGND
C N T0_C LK 38 4 PA C E R _ O U T
C N T0_O U T 37 3 T R G _ G AT E
C N T 0 _ G AT E 36 2 EXT_TRG
+12V 35 1 +5V
Internal External
+7 V D/A output.
Figure 3-3 shows how to make analog output and external reference
input connections on the PCI-1711.
Internal External
-5V DA0_REF
INT_REF
-10V
+
DA0_OUT External Reference
DA0 For DA Signal
Load _ 0
Load _
External Reference
DA1_OUT
DA1 For DA Signal
1
+
DA1_REF
INT_REF
I/O Connector
Visu al B asic,
Visu al C + +
C + + B u ild er L ab V IE W
D elp hi G en iD A Q
A ctiv eD A Q L ab V IE W D riv er
D L L D riv er
OS
DLL Driver
The Advantech DLL Drivers software is included on the companion
CD-ROM at no extra charge. It also comes with all the Advantech DAS
cards. Advantech’s DLL driver features a complete I/O function library
to help boost your application performance. The Advantech DLL
Advantech ActiveDAQ
ActiveDAQ provides a collection of add-on ActiveX controls and
function library to perform all data acquisition functions. It features an
icon-based graphical programming interface, a VBA-compatible
scripting language, and an Excel-like report generator.
With ActiveDAQ controls, you can develop your DAQ application
with your favorite programming tool, no matter if it is Visual Basic,
Visual C++, Delphi, C++ Builder, Access or Excel. LabVIEW and HP
VEE are also applicable. In addtion, ActiveDAQ also provides another
collection of easy-to-use Visual Basic data acquisition controls for
DAS cards.
Advantech GeniDAQ
GeniDAQ is a Windows-based software development package for data
acquisition, control, analysis and presentation. In addition to these
typical HMI functions, GeniDAQ is further enhanced with a Visual
Basic programming environment to facilitate rapid design of complex
applications that involve lengthy calculation and analysis. With Visual
Basic programming environment, customizing an application system
for special purposes becomes a piece of cake. The new 32-bit version
of GeniDAQ supports the PCI-1711/1731 card.
Register-level Programming
Register-level programming is reserved for experienced programmers
who find it necessary to write codes directly at the level of device
registers. Since register-level programming requires much effort and
time, we recommend that you use the Advantech DLL drivers instead.
However, if register-level programming is indispensible, you should
refer to the relevant information in Appendix C, Register Structure and
Format, or to the example codes included on the companion CD-ROM.
LabVIEW Driver
Advantech even provides users with a driver for National Instruments
LabVIEW. This 32-bit LabVIEW driver is compatible with Windows 95/
98 and Windows NT 4.0, offering both high-speed and normal-speed
data acquisition capabilities to your card.
Programming Tools
Programmers can develop application programs with their favorite
development tools:
q Visual C++
q Visual Basic
q Delphi
q C++ Builder
For instructions on how to begin programming works in each develop-
ment tool, Advantech offers a Tutorial Chapter in the DLL Drivers
Manual for your reference. Please refer to the corresponding sections
in this chapter on the DLL Drivers Manual to begin your programming
efforts. You can also take a look at the example source codes provided
for each programming tool, since they can get you very well-oriented.
The DLL Drivers Manual can be found on the companion CD-ROM.
Or if you have already installed the DLL Drivers on your system, The
DLL Drivers Manual can be readily accessed through the Start
button:
Start/Programs/Advantech Driver for 95 and 98 (or for NT)/Driver
Manual
The example source codes could be found under the corresponding
installation folder such as the default installation path:
\Program Files\Advantech\ADSAPI\Examples
For information about using other function groups or other develop-
ment tools, please refer to the Creating Windows 95/NT Application
with DLL Driver chapter and the Function Overview chapter on the
DLL Drivers Manual.
5.1 VR Assignment
There are four variable resistors (VRs) on the PCI-1711 card and two
variable resistors (VRs) on the PCI-1731 card. These variable resistors
are to facilitate accurate adjustments for all A/D and D/A channels.
Please refer to the following two figures for the VR positions.
V R3 V R4 V R1 V R2
V R1 V R2
of ±10V to the reference input of the D/A output channel you want to
calibrate. Adjust the full scale of D/A channel 0 and 1, with VR3 and
VR4 respectively.
Note:
✎ Using a precision voltmeter to calibrate the D/A outputs is recom-
mended.
You can adjust VR3 and VR4 until the D/A channel 0 and 1 output
voltages approach the reference voltage (at least 1LSB), but with the
reverse sign. For example, if Vref is -5V, then Vout should be +5V. If Vref
is -10V, Vout should be +10V.
Channels 1
Resolution 16-bit
Compatibility TTL level
Base Clock 10 MHz
Base Clock Accuracy 100 ppm
Max. Input Frequency 10 MHz
VIH 2.0 (min.)
Input Level H/L
VIL 0.8 V (max.)
TPWH
30 ns (min.)
(high pulse width)
Input Clock
TPWL
40 ns (min.)
(low pulse width)
IOH: -2.5 mA (VOH: 3.0V Min.)
Clock Out
IOL: +2.5 mA (VOL: 0.4V Max.)
TGW
50 ns (min.)
(gate width high)
Gate Input
TGL
50 ns (min.)
(gate width low)
General
A d d re ss D e co d e r
A ddress B us
P C I C o n tro lle r
D a ta B u s 1 6 -b it D ig ita l O u tp u t
P C I B us
IN T 1 6 -b it D ig ita l In p u t
A /D & D /A S ta tu s 1 2 -b it D /A O u tp u t 0
C o n tro l L o g ic
1 2 -b it D /A O u tp u t 1
C N T 0_C LK
10 M Hz
OSC COU NTER
1 2 -b it A /D PAC ER _O U T
2
C o n ve rto r
A /D T rig g e r
L o g ic
EXT_ TR G
S/W _ TR G
AI0
+
AI1
P G IA
-
M u ltip le xe r
C h a n n e l S ca n L o g ic
1 6 S /E
G a in C o n tro l R A M
AI15
C.1 Overview
The PCI-1711/1731 is delivered with an easy-to-use 32-bit DLL
driver for user programming under the Windows 95/98/NT operating
system. We advise users to program the PCI-1711/1731 using the 32-
bit DLL driver provided by Advantech to avoid the complexity of
low-level programming by register.
The most important consideration in programming the PCI-1711/
1731 at the register level is to understand the function of the card's
registers. The information in the following sections is provided only
for users who would like to do their own low-level programming.
Base Read
Address
+ decimal 7 6 5 4 3 2 1 0
Channel Number and A/D Data
1 CH3 CH2 CH1 CH0 AD11 AD10 AD9 AD8
N/A
3
2
N/A
5
4
Status Register
7 IRQ F/F F/H F/E
6 CNT0 ONE/FH IRQEN GATE EXT PACER SW
N/A
9
8
N/A
11
10
N/A
13
12
Base Read
Address
+ decimal 7 6 5 4 3 2 1 0
N/A
15
14
Digital Input
17 DI15 DI14 DI13 DI12 DI11 DI10 DI9 DI8
16 DI7 DI6 DI5 DI4 DI3 DI2 DI1 DI0
Counter 0
25
24 D7 D6 D5 D4 D3 D2 D1 D0
Counter 1
27
26 D7 D6 D5 D4 D3 D2 D1 D0
Counter 2
29
28 D7 D6 D5 D4 D3 D2 D1 D0
N/A
31
30
Base Write
Address
+ decimal 7 6 5 4 3 2 1 0
Software A/D Trigger
1
0
A/D Channel Range Setting
3
2 G2 G1 G0
MUX Control
5 Stop channel
4 Start channel
Control Register
7
6 CNT0 ONE/FH IRQEN GATE EXT PACER SW
Base Write
Address
+ decimal 7 6 5 4 3 2 1 0
D/A Reference Control
15
14 DA1_I/E DA1_5/10 DA0_I/E DA0_5/10
Digital Output
17 DO15 DO14 DO13 DO12 DO11 DO10 DO9 DO8
16 DO7 DO6 DO5 DO4 DO3 DO2 DO1 DO0
Counter 0
25
24 D7 D6 D5 D4 D3 D2 D1 D0
Counter 1
27
26 D7 D6 D5 D4 D3 D2 D1 D0
Counter 2
29
28 D7 D6 D5 D4 D3 D2 D1 D0
Counter Control
31
30 D7 D6 D5 D4 D3 D2 D1 D0
where G2 to G0 are Gain Codes and table C-4 lists the gain codes
for the PCI-1711/1731.
Table C-4 Gain codes for PCI-1711/1731
PCI-1711/1731
Gain Code
Gain Input Range(V)
G2 G1 G0
1 -10 to +10 0 0 0
2 -5 to +5 0 0 1
4 -2.5 to +2.5 0 1 0
8 -1.25 to +1.25 0 1 1
16 -0.625 to +0.625 1 0 0
ber.
l BASE+5 bit 3 to bit 0, CH3 ~ CH0, hold the stop scan channel num-
ber.
Writing to these two registers automatically initializes the scan range
of the MUXs. Each A/D conversion trigger also sets the MUXs to the
next channel. With continuous triggering, the MUXs will scan from
the start channel to the stop channel and then repeat. The following
examples show the scan sequences of the MUXs.
Example 1
If the start scan input channel is AI3 and the stop scan input channel
is AI7, then the scan sequence is AI3, AI4, AI5, AI6, AI7, AI3, AI4,
AI5, AI6, AI7, AI3, AI4…
Example 2
If the start scan channel is AI13 and the stop scan channel is AI2, then
the scan sequence is AI13, AI14, AI15, AI0, AI1, AI2, AI13, AI14,
AI15, AI0, AI1, AI2, AI13, AI14…
The content of the status register of BASE+6 is the same as that of the
control register.
F/E FIFO Empty flag
This bit indicates whether the FIFO is empty.
1 means that the FIFO is empty.
F/H FIFO Half-full flag
This bit indicates whether the FIFO is half-full.
1 means that the FIFO is half-full.
F/F FIFO Full flag
This bit indicates whether the FIFO is full.
1 means that the FIFO is full.
IRQ Interrupt flag
This bit indicates the interrupt status.
1 means that an interrupt has occurred.
Note!
✎ The default configuration of the digital output channels is a logic 0.
This avoids damaging external devices during system start-up or reset
since the power on status is set to the default value.
Counter 0
On the PCI-1711/1731, counter 0 can be a 16-bit timer or an event
counter, selectable by users. When the clock source is set as an
internal source, counter 0 is a 16-bit timer; when set as an external
source, then counter 0 is an event counter and the clock source comes
from CNT0_CLK. The counter is controlled by CNT0_GATE. When
CNT0_GATE input is high, counter 0 will begin to count.
Counter 1 & 2
Counter 1 and counter 2 of the counter chip are cascaded to create a
32-bit timer for the pacer trigger. A low-to-high edge of counter 2
output (PACER_OUT) will trigger an A/D conversion. At the same
time, you can use this signal as a synchronous signal for other
applications.
Description:
SC1 & SC0 Select counter
Counter SC1 SC0
0 0 0
1 0 1
2 1 0
Read-back command 1 1
If you set the module for binary counting, the count can be any
number from 0 up to 65535. If you set it for BCD (Binary Coded
Decimal) counting, the count can be any number from 0 to 9999.
If you set both SC1 and SC0 bits to 1, the counter control register is in
read-back command mode. The control register data format then
becomes:
BASE + 30(Dec) 82C54 control, read-back mode
Bit D7 D6 D5 D4 D3 D2 D1 D0
Value 1 1 CNT STA C2 C1 C0 X
Read/Write Operation
Before you write the initial count to each counter, you must first
specify the read/write operation type, operating mode and counter
type in the control byte and write the control byte to the control
register [BASE + 30(Dec)].
Since the control byte register and all three counter read/write registers
have separate addresses and each control byte specifies the counter it
applies to (by SC1 and SC0), no instructions on the operating se-
quence are required. Any programming sequence following the 82C54
convention is acceptable.
There are three types of counter operation: Read/load LSB, read /load
MSB and read /load LSB followed by MSB. It is important that you
make your read/write operations in pairs and keep track of the byte
order.
The read-back command can also latch status information for selected
counter(s) by setting STA bit = 0. The status must be latched to be
read; the status of a counter is accessed by a read from that counter.
The counter status format appears at the beginning of the chapter.