Bi-Directional Digital I/O
Board for PCI Express
Low Profile
DIO-48D-LPE
User’s Guide
CONTEC CO.,LTD.
Page 2
Check Your Package
Thank you for purchasing the CONTEC product.
The product consists of the items listed below.
Check, with the following list, that your package is c omplete. If yo u discover damaged or missing it ems,
contact your retailer.
Product Configuration List
- Board [DIO-48D-LPE] …1
- First step guide …1
- CD-ROM *1 [API-PAC(W32)] …1
- Standard-sized bracket …1
*1 The CD-ROM contains the driver software and User’s Guide (this guide)
Board
DIO-48D-LPE
First step guide
CD-ROM
[API-PAC(W32)]
Standard-sized
bracket
i
Page 3
Copyright
Copyright 2006 CONTEC CO., LTD. ALL RIGHTS RESERVED
No part of this document may be copied or reproduced in any form by any means without prior written
consent of CONTEC CO., LTD.
CONTEC CO., LTD. makes no commitment to update or keep current the information contained in this
document. The information in this document is subject to change without notice.
All relevant issues have been considered in the preparation of this document. Should you notice an
omission or any questionable item in this document, please feel free to notify CONTEC CO., LTD.
Regardless of the foregoing statement, CONTEC assumes no responsibility for any errors that may
appear in this document or for results obtained by the user as a result of using this product.
Trademarks
MS, Microsoft, Windows and Windows NT are trademarks of Microsoft Corporation. Other brand and
product names are trademarks of their respective holder.
ii
DIO-48D-LPE
Page 4
Table of Contents
Check Your Pack ag e............................................................................................................................i
Copyright ............................................................................................................................................ ii
Example Conn ect io n 1 (Us in g D I O-6 8 M/9 6 F) ......................................................................... 32
Example Conn ect io n 2 (Us in g P CA6 8 P S-* * P).........................................................................32
4.FUNCTION33
Data I/O Func tio n ............................................................................................................................. 3 3
I/O setup of the port................................................................................................................... 33
Data I/O......................................................................................................................................3 5
Digital Filter...................................................................................................................................... 36
Digital Filter Function Principle................................................................................................ 36
Set Digital F ilt e r Time............................................................................................................... 36
Interrupt Con tr ol Fu n ct io n................................................................................................................ 37
Disabling/En a bl ing I n te rr up ts....................................................................................................37
Selecting th e In t e rru p t E dg e ................................................................................................... ... 37
Clearing the Inte rru pt St atu s an d In t er ru p t Si g n al .................................................................... 37
iv
DIO-48D-LPE
Page 6
5.ABOUT SOFTWARE39
CD-ROM Directo r y S t ru c tu re .......................................................................................................... 39
About Software for Windo w s........................................................................................................... 40
Accessing the He lp F il e........................................................................................................ ..... 40
Using Sample Programs ............................................................................................................ 41
Uninstalling the Dr i v er Li b ra rie s .............................................................................................. 43
About Software for Linux ....................................................................................................... .......... 44
Driver Softwa re In s tal l Pro c ed ur e ............................................................................................. 44
Accessing the He lp F il e........................................................................................................ ..... 45
Using Sample Programs ............................................................................................................ 45
Uninstalling the driver............................................................................................................... 45
6.ABOUT HARDWARE47
For detailed t e chn ic a l in f o r mat io n ................................................................................................... 47
This chapter provides information you should know before using the product.
About the Board
This product is a PCI Express bus-compliant interface board t hat can perform the input/output of LVTT L
level bi-directional digital signal.
This product can input and output up to 48 channels. You can select the input/output by the application
software in eight signals units.
This product supports a Low Profile size slot and, if replaced with the supplied bracket, supports a
standard size slot, too.
Using the bundled API function library packa ge [API-P AC(W32)], you can create Windows appli cation
software for this board in your favorite programming language supporting Win32 API functions, such as
Visual Basic or Visual C++.
Features
-This product can be used to input/output 48 points bi-directional digital corresponding to the i8255
mode 0.
-You can use all of the input signals (Max. 48) as interrupt inputs.
You can also disable or enable the interrupt in bit units and select the interrupt edge.
-This product has a digital filter to prevent input signals from carrying noise or a chattering.
-You can set the input/output switching by the application software.
-Support for both of low-profile and standard size slots (interchangeable with a bundled bracket)
-Equipped with the same function as the PCI board PIO-48D(PCI), PIO-48D(LPCI)H and the
CardBus PIO-48D(CB)H
-The signal assignment for the connector when the DIO-68M/96F cable is used is compatible with
that for the connector when the PCB96P-** series and the PCB96PS-**P series option cable on the
PIO-48D(PCI) is used.
DIO-48D-LPE
1
Page 9
1. Before Using the Product
Support Software
You should use CONTEC support software according to your purpose and de velop ment environ ment.
Driver Library
API-PAC(W32)
API-PAC(W32) is the library software that provides the commands for CONTEC hardware products in
the form of Windows standard Win32 API functions (DLL). It makes it easy to create high-speed
application software taking adva nta g e of the CONTE C har dware usi ng va r ious programming languages
that support Win32 API functions, such as Visual Basic and Visual C++.
It can also be used by the installed diagnosis program to check hardware operations.
CONTEC provides download services (at http://www.contec.com/apipac/ ) to supply the updated drivers
and differential files.
For details, read Help on the bundled CD-ROM or visit the CONTEC’s Web site.
< Operating environment >
OSWindows XP, Server 2003, 2000
Adaptation language
Visual C++ .NET, V i sual C# . N ET, Vi s u al Ba si c . N ET, Vis u a l C+ +, Vi s u al Ba sic,
Delphi, C++Builder
Linux version of digital I/O driver
This driver is used to control CONTEC digital I/O boards (cards) from within Linux.
You can control CONTEC I/O boards easily using the shared library called from the user applicatio n, the
device driver (module) for kernel version, and the board (card) configuration program (config).
CONTEC provides download services (at http://www.contec.com/apipac/ ) to supply the updated drivers
and differential files.
For details, read Help on the bundled CD-ROM or visit the CONTEC’s Web site.
(For details on supported distributions, refer to Help available after installation.)
(Available for downloading (free of charge) from
VI-DAQ
the CONTEC web site.)
This is a VI library to use in National Instruments LabVIEW.
VI-DAQ is created with a function form similar to that of LabVIEW's Data Ac quisition VI, allowing you
to use various devices without complicated settings.
See http://www.contec.com/vidaq/ for details and download of VI-DAQ.
2
DIO-48D-LPE
Page 10
1. Before Using the Product
Cable & Connector (Option)
Shielded Cable for CardBusDigital I/O Card: DIO-68M/96F (0.5m)
Shield Cable with One 68-Pin Connector: PCA68PS-0.5P (0.5m)
: PCA68PS-1.5P (1.5m)
Accessories (Option)
Terminal Unit for Relay Terminal Banks: EPD-96 *1
Screw Terminal: DTP-64(PC) *1
*1 DIO-68M/96F optional cable is required separately.
* Check the CONTEC’s Web site for more information on these options.
DIO-48D-LPE
3
Page 11
1. Before Using the Product
Customer Support
CONTEC provides the following sup port services for you t o use CONTEC product s more efficiently and
comfortably.
Web Site
Japanese http://www.contec.co.jp/
English http://www.contec.com/
Chinese http://www.contec.com.cn/
Latest product information
CONTEC provides up-to-date information on products.
CONTEC also provides product manuals and various technical documents in the PDF.
Free download
You can download updated driver software and differential files as we ll as sample program s available in
several languages.
Note! For product information
Contact your retailer if you have any technical question about a CONTEC product or need its price,
delivery time, or estimate information.
Limited Three-Years Warranty
CONTEC products are warranted by CONTEC CO., LTD. to be free from defects in material and
workmanship for up to three years from the date of purchase by the original purchaser.
Repair will be free of charge only when this device is returned freight pre paid with a c opy of the ori ginal
invoice and a Return Merchandise Authorization to the distributor or the CONTEC group office, from
which it was purchased.
This warranty is not applicable for scratches or normal wear, but only for the electronic circuitry and
original products. The warranty is not applicable if the device has been tampered with or damaged
through abuse, mistreatment, neglect, or unreasonable use, or if the original invoice is not included, in
which case repairs will be considered beyond the warranty policy.
How to Obtain Service
For replacement or repair, return the device freight prepaid, with a copy of the original invoice. Please
obtain a Return Merchandise Authorization number (RMA) from the CONTEC group office where you
purchased before returning any product.
*No product will be accepted by CONTEC group without the RMA number.
Liability
The obligation of the warrantor is solely to repair or replace the product. In no event will the warrantor
be liable for any incidental or consequentia l damages due to s uch defect or consequences t hat arise from
inexperienced usage, misuse, or malfunction of this device.
4
DIO-48D-LPE
Page 12
1. Before Using the Product
Safety Precautions
Understand the following definitions and precautions to use the product safely.
Safety Information
This document provides safety i nformation usin g the following sym bols to prevent accidents resulting in
injury or death and the destructio n of equipment an d resources. U nderstand t he meanings of these labels
to operate the equipment safely.
DANGER
WARNING
CAUTION
DANGER indicates an imminently hazardous situation which, if not avoided, will
result in death or serious injury.
WARNING indicates a potentially hazardous situation which, if not avoided, could
result in death or serious injury.
CAUTION indicates a potentially hazardous situation which, if not avoided, may
result in minor or moderate injury or in property damage.
DIO-48D-LPE
5
Page 13
1. Before Using the Product
Handling Precautions
DANGER
Do not use the product where it is exposed to flamm able or corrosi ve gas. Doing so ma y result in an
explosion, fire, electric shock, or failure.
CAUTION
-There are switches and jumpers on the board that need to be set in advance. Be sure to check these
before installing the board.
-Only set the switches and jumpers on the board to the specified settings.
Otherwise, the board may malfunction, overheat, or cause a failure.
-Do not strike or bend the board. Doing so could damage the board.
Otherwise, the board may malfunction, overheat, cause a failure or breakage.
-Do not touch the board's metal plated terminals (edge connector) with your hands.
Otherwise, the board may malfunction, overheat, or cause a failure.
If the terminals are touched by someone's hands, clean the terminals with industrial alcohol.
-Do not install or remove the board to or from the extension slot while the computer's power is turned on.
And also do not connect the board and external device while the power is turned on.
Otherwise, the board may malfunction, overheat, or cause a failure.
Be sure that the personal computer or the I/O extension unit power is turned off.
-Make sure that your PC or extension unit can supply ample power to all the boards installed.
Insufficiently energized boards could malfunction, overheat, or cause a failure.
-The specifications of this product are subject to change without notice f or enhancem ent and quality
improvement.
Even when using the product cont inu ously, be s ure t o read the manual a nd understand the contents.
-Do not modify the product. CONTEC will bear no responsibility for any problems, etc., resulting
from modifying this product.
-Regardless of the foregoing statements, CONTEC is not liab le for any damages whatsoever
(including damages for loss of business profits) arising out of the use or inability to use this
CONTEC product or the information contained herein.
6
DIO-48D-LPE
Page 14
1. Before Using the Product
Environment
Use this product in the following environment. If used in an unauthorized environment, the board may
overheat, malfunction, or cause a failure.
Operating temperature
0 - 50°C
Operating humidity
10 - 90%RH (No condensation)
Corrosive gases
None
Floating dust particles
Not to be excessive
Inspection
Inspect the product periodically as follows to use it safely.
- Check that the bus connector
of the board and its cable have
been plugged correctly.
- Check that the board has
no dust or foreign matter adhering.
- The gold-plated leads of the bus connector
have no stain or corrosion.
Storage
When storing this product, keep it in its original packing form.
(1) Put the board in the storage bag.
(2) Wrap it in the packing material, and then put it in the box.
(3) Store the package at room temperature at a place free from direct sunlight, moisture, shock,
vibration, magnetism, and static electricity.
Disposal
When disposing of the product, follow the disposal procedures stipulated under the relevant laws and
municipal ordinances.
DIO-48D-LPE
7
Page 15
1. Before Using the Product
8
DIO-48D-LPE
Page 16
2. Setup
2. Setup
This chapter explains how to set up the board.
What is Setup?
Setup means a series of steps to take before the product can be used.
Different steps are required for software and hardware.
The setup procedure varies with the OS and applications used.
Using the Board under Windows
Using the Driver Library API-PAC(W32)
This section describes the setup procedure to be performed before you can start developing application
programs for the board using the bund led C D -ROM “Driver Library API-PAC(W32)”.
Taking the following steps sets up the software and hardware. You can use the diagnosis program later
to check whether the software and hardware function normally.
Step 1 Installing the Software
Step 2 Setting the Hardware
Step 3 Installing the Hardware
Step 4 Initializing the Software
Step 5 Checking Operations with the Diagnosis Program
If Setup fails to be performed normally, see the “Setup Troubleshooting” section at the end of this
chapter.
Using the Board under Windows
Using Software other than the Drive r Li br ary API -PAC(W32)
For setting up software other than API-PAC(W32), refer to the manual for that software. See also the
following parts of this manual as required.
This chapter Step 2 Setting the Hardware
This chapter Step 3 Installing the Hardware
Chapter 3 External Connection
Chapter 6 About Hardware
DIO-48D-LPE
9
Page 17
2. Setup
Using the board under an OS other than Windows
For using the board under Linux, see the following parts of this manual.
This chapter Step 2 Setting the Hardware
Chapter 3 External Connection
Chapter 5 About Software
Chapter 6 About Hardware
For using the board under an OS other than Windows and Linux, see the following parts of this manual.
This chapter Step 2 Setting the Hardware
Chapter 3 External Connection
Chapter 6 About Hardware
10
DIO-48D-LPE
Page 18
Step 1 Installing the Software
This section d es cribes how to inst all the Driver libraries.
Before installing the hardware on your PC, install the Driver libraries from the bundled
API-PAC(W32) CD-ROM.
The following description assumes the operating system as Windows XP. Although some user
interfaces are different depending on the OS used, the basic procedure is the same.
Starting the Install Program
(1)
Load the CD-ROM [API-PAC(W32)] on your PC.
(2)
The API-PAC(W32) Installer window appears automatically.
If the panel does not appear, run (CD-ROM drive letter):\AUTORUN.exe.
(3)
Click on the [Install Development or Execution Environment] button.
2. Setup
CAUTION
Before installing the sof t ware in Window s X P, 2000, lo g in as a us er wi th admin i st rat o r privil ege s.
DIO-48D-LPE
11
Page 19
2. Setup
Selecting the Digital I/O Driver
(1)
The following dialog box appears to select “Driver Type” and “Install Type”.
(2)
Select “Digital I/O API-DIO(98/PC)”.
(3)
Select “Driver, Help, etc… (Full install)”.
(4)
Click on the [Install] button.
12
DIO-48D-LPE
Page 20
2. Setup
Executing the Installation
(1)
Follow the on-screen instructions to proceed to install.
(2) When the required files have been copied, the “Perform a hardware setup now” and “Show readme
file” check boxes are displayed.
When you are installing the software or hardw are for the first time:
1) Uncheck the “Perform a hardware setup now”.
2) Click on the [Finish] button.
Go to Step 2 to set and plug the hardware.
*When the hardware has already been installed:
Check “Perform a hardware setup now”, then go to Step 4 “Initializing the Software”.
You have now finished i nst all ing the so ftw are .
DIO-48D-LPE
13
Page 21
2. Setup
Step 2 Setting the Hardware
This section describes how to set the board and plug it on your PC.
The board has some switches to be preset.
Check the on-board switches before plugging the board into an extension slot.
The board can be set up even with the factory defaults untouched. You can change board settings later.
Replacing the Bracket
This board is shipped with a Lo w Profile size bracket mounted. To plug the board into a standard size
slot, replace the bracket with the bundled standard size bracket. The replacing method is as follows :
Standard size bracket
- Remove the screws and replace it
with the Standard size bracket.
Low Profile size bracket
Screw
Use a flathead screwdriver or hexagonal
spanner to undo and tighten the screws.
Figure 2.1. Replacing the Bracket
14
DIO-48D-LPE
Page 22
2. Setup
Parts of the Board and Factory Defaults
Figure 2.2. shows the names of major parts on the board.
Note that the switch setting shown below is the factory default.
- Interface connector
(CN1)
- Board ID setting S W
SW1
BOARD ID
(SW1)
SW1
BOARD ID
8
9
7
A
6
B
5
4
3
E
2
F
1
0
C
D
Figure 2.2. Component Locations
Setting the Board ID
If you install two or more boards on one personal computer, assign a different ID value to each of the
boards to distinguish them.
The board IDs can be set from 0 to Fh to identify up to sixteen boards.
If only one board is used, th e original factory setting (Board ID = 0) should be used.
Setting Procedure
To set the board ID, use the rotary switch on the board. Turn the SW1 knob to s et the board I D as show n
below.
SW1
BOARD ID
8
9
A
7
6
B
5
C
4
D
3
E
2
F
0
1
Factory setting :
(Board ID = 0)
Figure 2.3. Board ID Settings (SW1)
DIO-48D-LPE
15
Page 23
2. Setup
Plugging the Board
(1) Before plugging the board, shut down the system, unplug the power code of your PC .
(2) Remove the cover from the PC so that the board can be mounted.
(3) Plug the board into an extension slot.
(4) Attach the board bracket to the PC.
(5) Put the cover back into place.
CAUTION
-Do not touch the board's metal plated terminals (edge connector) with your hands.
Otherwise, the board may malfunction, overheat, or cause a failure.
If the terminals are touched by someone's hands, clean the terminals with industrial alcohol.
-Do not install or remove the bo ard to or from the slot while the computer's power is turned on.
Otherwise, the board may malfunction, overheat, or cause a failure.
Doing so could cause trouble. Be sure that the personal computer or the I/O extension unit power is
turned off.
- Make sure that your PC or extension unit can supply ample power to all the boards installed.
Insufficiently energized boards could malfunction, overheat, or cause a failure.
16
DIO-48D-LPE
Page 24
2. Setup
Step 3 Installing the Hardware
For using an ext en s io n board un der Window s, you have to let the OS dete ct the I/O a ddresse s and IRQ to
be used by the board. The process is referred to as in stalling the hardware.
In the case of using two or more boards, make sure you install one by one with the Add New Hardware
Wizard.
Turning on the PC
Turn on the power to your PC.
CAUTION
- The board cannot be properly installed unless the resources (I/O addresses and interrupt level) for
the board can be allocated. Before attempting to install the board, first determine what PC resources
are free to use.
- The resources used by each board do not depend on the location of the PCI Express bus s lot or the
board itself.
If you remove two or more boar ds that h ave alre ady b een in stalle d and the n rem ount one of them o n
the computer, it is unknown that which one of the sets of resources previously assigned to the two
boards is assigned to the remounted board. In this case, you must check the resource settings.
Setting with the Found New Hardware Wizard
(1) First, “PCI Standard PCI to PCI Bridge” will be checked and end automatically.
(2) The “Found New Hardware Wizard” will be started.
Select “Install from a list or specific location[Advanced]”, then click on the [Next] button.
DIO-48D-LPE
17
Page 25
2. Setup
(3) Specify that folder on the CD-ROM which contains the setup information (INF) file to register the
board.
* The name of the board
you have just added is
displayed.
- DIO-48D-LPE
Source folder
The setup information (INF) file is contai ned in the following folder on the bundled CD-ROM.
Windows XP, 2000\INF\Win2000\Dio\PCI
Example of specifying the folder for use under Windows XP
\INF\Win2000\Dio\PCI
18
DIO-48D-LPE
Page 26
2. Setup
CAUTION
In Windows XP, the Hardware Wizard disp lays the following alert dialog box when you have
located the INF file. This dialog box appears, only indi cating that the re levant dri ver has not pas sed
Windows Logo testing, and it ca n be ignor e d wit hout developing any problem with the operation of
the board.
In this case, click on the [Continue Anyway] button.
You have now finished installing the software.
* The name of the board
you have just added is
displayed.
- DIO-48D-LPE
DIO-48D-LPE
19
Page 27
2. Setup
Step 4 Initializing the Software
The Driver library requires the initial setting to recognize the execution environment. It is called the
initialization of the Dri ve r li br ary.
Invoking API-TOOL Configuration
(1) Open the Start Menu, then select “Programs” – “CONTEC API-PAC(W32)” – “API-TOOL
Configuration”.
(2) API-TOOL Configuration dete ct s the ha rd ware automatically.
The detected the boards are listed.
Updating the Settings
(1) Select “Save settings to registry…” fro m the “File” menu.
You have now finished installing the initial setting of Software.
20
DIO-48D-LPE
Page 28
2. Setup
Step 5 Checking Operations with the Diagnosis
Program
Use the diagnosis program to check that the board and driver software work normally, thereby you can
confirm that they have been set up correctly.
What is the Diagnosis Program?
The diagnosis program diagnoses th e states of the board and driver software.
It can also be used as a simple checker when an ex t ern al dev i ce i s actu al l y con ne ct ed .
Using the “Diagnosis Report” feature reports the driver settings, the presence or absence of the board,
I/O status, and interrupt status.
Check Method
Connect the board to a remote device to test the input/output and check the execution environment.
To connect the external device, see Chapter 3 “External Connection”.
DIO-48D-LPE
21
Page 29
2. Setup
Using the Diagnosis Program
Starting the Diagnosis Program
Select the board in the API-TOOL Configuration windows, then run the Diagnosis Program. Follow the
instructions on screen.
* The name of the board you have just added is displayed.
* The name of the board
you have just added is
displayed.
- DIO-48D-LPE
22
DIO-48D-LPE
Page 30
Checking Digital Inputs and Ou tputs
The main panel of the Diagnosis Program appears.
You can check the current operation states of the board in the following boxes:
“Input Port”: Displays input values bit by bit at fixed time intervals.
“Output Port”: Mouse operation allows the data to output or display.
“Interrupt”: Displays the number of interrupts detected bit by bit.
* The name of the board
you have just added is
displayed.
- DIO-48D-LPE
2. Setup
To use the wait time control feature, click on the [Wait Configuration] button. Use the feature when the
wait time based on the DioWait or DioWaitEx function is not normal.
To use the function execution tim e measurement fea ture, click on the [Measurem ent Time] button. E nter
the I/O start port and the number of ports, t hen press the measurement button. The time for each
execution of a function will be measured.
DIO-48D-LPE
23
Page 31
2. Setup
Diagnosis Report
(1) Clicking on the [Show Diagnosis Report] button displays detailed data such as board settings and
the diagnosis results while saving them in text format.
The results are saved and displayed as a text file (DioRep.txt) in the install folder (Program
Files\CONTEC\API-PAC(W32)).
The Diagnosis Program performs “board presence/absence che ck”, “driver file test”, “board setting
test”, and so on.
CAUTION
Before executing diagnosis report output, unplug the cable from the board.
* The name of the board
you have just added is
displayed.
- DIO-48D-LPE
Click on [Show
(2) A diagnosis report is displayed as shown below.
* The name of the board
you have just added is
displayed.
- DIO-48D-LPE
24
Diagnosis Report].
DIO-48D-LPE
Page 32
2. Setup
Setup Troubleshooting
Symptoms and Actions
No output can be obtained.
Use API-TOOL Configuration to check whether the board name setting is wrong.
The board works with the Diagnosis Program but not with an application.
The Diagnosis Program is coded with API-TOOL functions. As long as the board operates with the
Diagnosis Program, it is to operate with other applications as well. In such cases, review your program
while paying attention to the following points:
-Check the arguments to functions and their return values.
-When the board is an isolated type, it has a tim e lag for its re sponse between the o utput by a function
and the actual output. Consider the execution intervals between functions.
The OS won’t normally get started or detect the board. [Windows XP
Turn off the power to your PC, then unplug the board. Restart the OS and delete the board settings of
API-TOOL Configuration. Turn off the PC again, plug the board, and restart the OS. Let the OS detect
the board and use API-TOOL Configuration to register board settings.
2000]
,
If your problem cannot be resolved
Contact your retailer.
DIO-48D-LPE
25
Page 33
2. Setup
26
DIO-48D-LPE
Page 34
3. External Connection
3. External Connection
This chapter describes the interface connectors on the board and the external I/O circuits.
Check the information available here when connecting an external device.
How to connect the connectors
Connector shape and optional cable connection
The on-board interface connector (CN1) is used when connecting this product and the external devices.
Interface connector (CN1)
- Connector used
68-pin 0.8mm pitch connector
HDRA-E68LFDT+ [HONDA TSUS HIN
KOGYO CO., LTD.] or equivalent
- [ ] shows the pin No. of HONDA TSUSHIN KOGYO CO., LTD. specification.
Figure 3.4. Pin Assignments on 96-pin Connector Side
DIO-48D-LPE
29
Page 37
3. External Connection
Relationships between API-PAC(W32) Logical Ports/Bits and
Connector Signal Pins
The following table lists the relationships between the connector signal pins and the logical port/bit
numbers used for I/O functions when applications are written with API-PAC(W32).
Table 3.1. Logical Ports, Logical Bits, and Connector Signal Pins
D7D6D5D4D3D2D1D0
1-PA7
1-PA6
1-PA5
1-PA4
1-PA3
1-PA2
1-PA1
I/O Logical Ports0
I/O Logical Ports 1
I/O Logical Ports 2
I/O Logical Ports 3
I/O Logical Ports 4
I/O Logical Ports 5
Note : 1-PAx, 1-PBx, 1-PCx, 2-PAx, 2-PBx, 2-PCx represents an I/O signal of CN1
[7]
[6]
[5]
1-PB7
1-PB6
[14]
1-PC6
[22]
2-PA6
[30]
2-PB6
[38]
2-PC6
[46]
1-PB5
[13]
1-PC5
[21]
2-PA5
[29]
2-PB5
[37]
2-PC5
[45]
[15]
1-PC7
[23]
2-PA7
[31]
2-PB7
[39]
2-PC7
[47]
[xx] represents a logical bits
[4]
1-PB4
[12]
1-PC4
[20]
2-PA4
[28]
2-PB4
[36]
2-PC4
[44]
[3]
1-PB3
[11]
1-PC3
[19]
2-PA3
[27]
2-PB3
[35]
2-PC3
[43]
[2]
1-PB2
[10]
1-PC2
[18]
2-PA2
[26]
2-PB2
[34]
2-PC2
[42]
[1]
1-PB1
[9]
1-PC1
[17]
2-PA1
[25]
2-PB1
[33]
2-PC1
[41]
1-PA0
[0]
1-PB0
[8]
1-PC0
[16]
2-PA0
[24]
2-PB0
[32]
2-PC0
[40]
CAUTION
The logical port and logical bit numbers are virtual port and bit numbers that enable programming
independent of board I/O addresses or board types.
For details, refer to API-DIO HELP available after installing API-PAC(W32).
30
DIO-48D-LPE
Page 38
3. External Connection
Connecting I/O Signals
The I/O circuits of interface blocks of this board are illustr ated in Figure 3.5. Signals are LVTTL levels
and positive logic. None of the signals is pulled up.
I/O Circuit
External circuitBoard
SN74LV245
Ω
33
INPUT/OUTPUT
GND
Figure 3.5. I/O Circuit
CAUTION
-Take care not to short the outputs to digital ground as this may cause a fault.
-If connecting pull-up resis tors to the output s, use a resist or of approximat ely 10kΩ and pull-up to the
5V power supply, or use a resistor of approximately 4.7kΩ and pull-up to the 3.3V power supply.
GND
DIO-48D-LPE
31
Page 39
3. External Connection
Example Connection 1 (Using DIO-68M/96F)
Input
96 pin connector side
SN74LV245
or equivalent
GND
Output
96 pin connector side
SN74LV245
or equivalent
GND
33Ω
33Ω
1-PA0 (A02 pin)
GND (A01 pin)
2-PA0 (B02 pin)
GND (B01 pin)
Cable
Cable
External circuit
Signal source
External circuit
Target
+3.3V
10kΩ
+3.3V
6.8kΩ
Figure 3.6. Connection Example Using 1-PA0 for Input and 2-PA0 for Output
(Using DIO-68M/96F)
Example Connection 2 (Using PCA68PS-**P)
Input
96 pin connector side
SN74LV245
or equivalent
GND
Output
96 pin connector side
SN74LV245
or equivalent
GND
33Ω
33Ω
1-PA0 (3 pin)
GND (2 pin)
2-PA0 (37 pin)
GND (36 pin)
Cable
Cable
External circuit
Signal source
External circuit
Target
+3.3V
10kΩ
+3.3V
6.8kΩ
Figure 3.7. Connection Example Using 1-PA0 for Input and 2-PA0 for Output
(Using PCA68PS-**P)
32
DIO-48D-LPE
Page 40
4. Function
4. Function
This section describes the features of the board.
Each function described here can be easily set and exec uted by using the bundle d API driver library. For
details, refer to API-DIO HELP available after installation.
Data I/O Function
This board supports mode 0 of two i8255 chips, capable of input/output of up to 48 LVTTL-level active
high signals.
I/O setup of the port
The I/O function of the port must be set properly before the board can input/ou tput data correctly.
Writing a control word sets each port for either input or output.
CAUTION
Each port is assigne d as an in pu t po rt w h en th e po wer is t u rn ed on .
Input
When input data is low level, [0] is input to the corresponding bit.
When input data is high level, [1] is input to the corresponding bit.
Output
When [0] is output to the corresponding bit, low level is output to the external part.
When [1] is output to the corresponding bit, high level is outp ut to th e ex ternal part.
4. Function
DIO-48D-LPE
35
Page 43
4. Function
Digital Filter
Using this feature, this product can apply a digital filter to every input pin, thereby preventing the input
signal from being affected by noise or chattering.
Digital Filter Function Principle
The digital filter checks the input signal level during the sampling time of the clock signal. When the
signal level remains the same for the digital filter set time, the digital filter recognizes that signal as the
input signal and changes the signal level of the PC
If the signal level changes at a frequency shorter than the set time, there fore, the level cha nge is ignored.
Input Signal
Digital
Filter
Filter Setting Time
Input to PC
Input Signal
Invalid
Input to PC
Valid
Figure 4.3. Digital Filter Function Principle
Set Digital Filter Time
Set the digital filter time to 0 - 20 (14h).
Setting the digital filter time to 0 disables digital filtering. It is set to 0 when the power is turn ed on .
Figure 4.4 shows the relationships between digital filter time settings and the actual digital filter times.
-If you set the digital filter time, the filter applies to all in put pins. You cannot a pply the filter only to
a specific filter.
-Do not set Setting Data to a value outside the above range as doing so can cause the board to
malfunction.
n
/ (8 x 106)
Digital Filter
Data(n)
7 (07h)16µsec14 (0Eh)2.048msec
Time
Setting
Data(n)
Digital
FilterTime
36
DIO-48D-LPE
Page 44
4. Function
Interrupt Control Function
This product can use all of the input signals as interrupt request signals.
The board can generate an interrupt request signal to the PC w hen the input signal change s from High to
Low or from Low to High.
When the digital filter (described above) is used, interrupt requests are generated by input signals that
have passed through the filter.
Disabling/Enabling Interrupts
Interrupt mask bits can be used to disable or enable the individual bits for interruptions.
Once a certain bit has been interrupt-disabled, no interrupt occurs even when the corresponding input
signal changes its level.
To let interrupts occur, enable the corresponding interrupt mask bit for interruptions.
CAUTION
All of the interrupt mask bits are interrupt-disabled wh en the power is turned on.
Selecting the Interrupt Edge
Interrupt edge select bits can be used to set the input logic for interruption bit by bit.
If you set an interrupt edge select bit to 0, an interrupt occurs when the input value to the corresponding
bit changes from 0 to 1 (at the rise of the input signal from Low to High).
If you set an interrupt edge select bit to 1, an interrupt occurs when the input value to the corresponding
bit changes from 1 to 0 (at the fall of the input signal from High to Low).
CAUTION
When the power is turned on, a ll of th e inte rrup t edge select bits are set to 0 so that an interrupt
occurs when the input valu e ch an ges f rom 0 to 1 (at the rise of the input s ign al fro m Low to Hi gh).
Clearing the Interrupt Status and Interrupt Signal
Interrupt status bits are used to identify the input signal bit being used for requesting an interrupt.
When an interrupt statu s is in put , th e in te rrupt request signal and the interrupt status are cleared
automatically.
CAUTION
-All of the interrupt status bits are set to 0 when the power is turned on.
-If an interrupt mask bit has been set to disable interrupts, the interrupt status bit is not set even when
the input signal changes its level.
DIO-48D-LPE
37
Page 45
4. Function
38
DIO-48D-LPE
Page 46
5. About Software
CD-ROM Directory Structure
\
|– Autorun.exeInstaller Main Window
| Readmej.htmlVersion information on each API-TOOL (Japanese)
| Readmeu.htmlVersion information on each API-TOOL (English)
.
.
| ––ReleaseDriver file on each API-TOOL
| |––API_NT(For creation of a user-specific install program)
| |––API_W95
.
.
| ––UsersGuideHardware User’s Guide (PDF files)
5. About Software
DIO-48D-LPE
39
Page 47
5. About Software
About Software for Windows
The bundled CD-ROM “Driver Library API-PAC(W32)” contains the functions th at provide the
following features:
-Digital input/output of specified ports
-Hardware digital input/output of specif ied bits
-Hardware digital filtering that prevents chattering
For details, refer to the help file. The help file provides various items of information such as “Function
Reference”, “Sample Programs”, and “FAQs”. Use them for program development and troublesh ooting.
Accessing the Help File
(1) Click on the [Start] button on the Windows taskbar.
(2) From the Start Menu, select “Programs” – “CONTEC API-PAC(W32)” – “Dio” – “API-DIO
HELP” to display help information.
40
DIO-48D-LPE
Page 48
5. About Software
Using Sample Programs
Sample programs have been prepared for specific basic applications.
To use each sample program, enter its dri ver number and grou p number set by API-T OOL Configurati on
in the DrvNo and GrpNo fields.
Use these sample programs as references for program development and operation check.
The sample programs are stored in \Program Files\CONTEC\API-PAC(W32)\Dio\Samples.
Running a Sample Program
(1) Click on the [Start] button on the Windows taskbar.
(2) From the Start Menu, select “Programs” – “CONTEC API-PAC(W32)” – “Dio” – “SAMPLE…”.
(3) A sample program is invoked.
DIO-48D-LPE
41
Page 49
5. About Software
Sample Programs - Examples
-Sample program 1:Inputs digital data through a specified port.
-Sample program 2:Outputs digital data through a specified port.
-Sample program 3:Inputs/outputs digital data from/to a programmable board.
-Sample program 4:Inputs digital data from a specified port in the background.
-Sample program 5:Inputs/outputs digital data from/to a specified bit.
-Sample program 6:Services interrupts of a specified board.
-Sample program 7:Provides process control of a specified board.
-Sample program 8:Performs trigger monitoring of a specified board.
-Sample program 9:Inputs digital data through a specified port using BCD data.
-Sample program 10:Executes digital input (simple functions) at specified bits through a
-Sample program 11:Services interrupts of a specified board (using an extended function).
-Sample program (Console):Inputs/outputs digital data through a specified port.
[Sample program 1] [Sample program 2]
specified port.
[Sample program 5][Sample program 9]
42
DIO-48D-LPE
Page 50
5. About Software
Uninstalling the Driver Libraries
To uninstall API-PAC(W32), follow the procedure below.
(1) Click on the [Start] button on the Windows taskbar. From the Start Menu, select “Settings” -
“Control Panel”.
(2) Double-click on “Add/Remove Programs” in the Control Panel.
(3) Select “CONTEC API-DIO(98/PC)xx” from the application list displayed, then click on the
[Change/Remove] button. Follow the on-screen instructions to uninstall the function libraries.
DIO-48D-LPE
43
Page 51
5. About Software
About Software for Linux
The Linux version of digital I/O function driver, API-DIO(LNX), provides functions that execute the
following features:
-Digital input/output of specified ports
-Digital input/ou t put of specified bits
-Hardware digital filtering that prevents chattering
For details, refer to the help file. The help file provides various items of information such as “Function
Reference”, “Sample Programs”, and “FAQs”. Use them for program development and troublesh ooting.
Driver Software Install Procedure
The Linux version for digital I/O driver, API-DIO(LNX), is supplied as a compressed file
/linux/dio/cdioXXX.tgz on the bundled API-PAC(W32)CD-ROM. (Note: XXX represents the driver
version.)
Mount the CD-ROM as shown below, copy the file to an arbitrary directory, and decomp ress the file to
install the driver.
For details on using the driver, refer to readme.txt and the help file in HTML format extracted by
installation.
To install the driver, l og in as a sup erus er.
Decompression and setup procedure
# cd
# mount /dev/cdrom /mnt/cdromMount the CD-ROM.
# cp /mnt/cdrom/linux/dio/cdioXXX.tgz ./Copy the compressed file.
# tar xvfz cdioXXX.tgzDecompress the compressed file.
................
# cd contec/cdio
# makeCompile the file.
................
# make installInstall.
................
# cd config
# ./configSet up the board to be used.
..... Set as follows .........
# ./contec_dio_start.shStart the driver.
# cd
44
DIO-48D-LPE
Page 52
5. About Software
Accessing the Help File
(1) Invoke a web browser in your X-Window environment.
(2) In the browser, open diohelp.htm in the contec/cdio/help directory.
Using Sample Programs
Sample programs have been prepared for specific basic applications.
Sample programs for each language are contained in the contec/cdio/samples directory. For compiling
them, refer to the manual for the desired language.
Uninstalling the driver
To uninstall the driver, use the uninstall shell script contained in the contec/cdio directory. For details,
check the contents of the script.
DIO-48D-LPE
45
Page 53
5. About Software
46
DIO-48D-LPE
Page 54
6. About Hardware
6. About Hardware
This chapter provides hardware specifications and hardware-related supplementary information.
For detailed technical information
For further detailed technical information (“Technical Reference” including the information such as an
I/O map, configuration register, etc.), visit the Contec's web site (http://www.contec.com/support/) to
call for it.
Hardware specification
Table 6.1. Specification
ItemSpecification
I/O
I/O formatUnisolated LVTTL-level I/O (Positive logic) *1
Number of I/O channels48 channels (all availabl e for inte rrupts)
Interrupt48 interrupt input signals are arranged into a single output of
Built-in power
Allowable distance of signal extension Approx. 1.5m (depending on wiring environment)
Interruption level1 level use
Max. board count for connection16 boards including the master board
I/O addressAny 32-byte boundary (Common to I/O part)
Power consumption (Max)3.3VDC 300mA
Operating condition0 - 50°C, 10 - 90%RH (No condensation)
Bus specification
Dimension (mm)
Connector used68 pin 0.8mm pitch connector
Weight
*1 Data “1” and “0” correspond to the High and Low levels, respectively.
Board Dimensions
121.69(L)
interrupt signal INT.
An interrupt is generated at the falling edge
(HIGH-to-LOW transition) or
rising edge (LOW-to-H I G H tra nsi tio n).
None
PCI Express Base Specification Rev. 1.0a x 1
121.69 (L) x 67.90 (H)
HDRA-E68LFDT+ [HONDA TSUSHIN KOGYO CO., LTD.]
or equivalent
60g
67.90(H)
The standard outside dimension (L) is
the distance from the end of the board to
the outer surface of the slot cover.
[mm]
DIO-48D-LPE
47
Page 55
6. About Hardware
Block Diagram
LVTTL
transceiver
LVTTL
transceiver
TTL
transceiver
Control
circuit
PCI Express bus
Interrupt
control
LVTTL
transceiver
LVTTL
transceiver
LVTTL
transceiver
LVTTL
transceiver
LVTTL
transceiver
1-A por t
(8 points)
1-B port
(8 points)
1-C port (High)
(4 points)
1-C port (Low)
(4 points)
2-A port
(8 points)
2-B port
(8 points)
2-C port (High)
(4 points)
2-C port (Low)
(4 points)
DIO-48D-LPE
Figure 6.1. Block Diagram
48
DIO-48D-LPE
Page 56
DIO-48D-LPE
User’s Guide
CONTEC CO., LTD.May 2006 Edition
3-9-31, Himesato, Nishiyodogawa-ku, Osaka 555-0025, Japan
Japanese http://www.contec.co.jp/
Englishhttp://www.contec.com/
Chinese http://www.contec.com.cn/
No part of this document may be copied or reproduced in any form by any means without prior written
consent of CONTEC CO., LTD. [05252006]