NuDAQ PET-48DIO User manual

NuDAQ
PET-48DIO
Programmable 48-bit DIO
Event, and Timer Cards
User’s Guide


@Copyright 1997~2000 ADLINK Technology Inc.
All Rights Reserved.
Manual Rev. 3.22: April 17, 2000
The information in this document is subject to change without prior
notice in order to improve reliability, design and function and does not
represent a commitment on the part of the manufacturer.
In no event will the manufacturer be liable for direct, indirect, special,
incidental, or consequential damages arising out of the use or inability
to use the product or documentation, even if advised of the possibility
of such damages.
This document contains proprietary information protected by copyright.
All rights are reserved. No part of this manual may be reproduced by
any mechanical, electronic, or other means in any form without prior
written permission of the manufacturer.
Trademarks
NuDAQis registered trademarks of ADLINK Technology Inc.
Other product names mentioned herein are used for identification
purposes only and may be trademarks and/or registered trademarks of
their respective companies.

Getting service from ADLINK
Customer Satisfaction is always the most important thing for ADLINK Tech Inc.
If you need any help or service, please contact us and get it.
ADLINK Technology Inc.
Web Site http://www.Adlink.com.tw
Sales & Service
Technical NuDAQ [email protected]
Support NuDAM [email protected]
TEL+886-2-82265877 FAX +886-2-82265717
Address
9F, No. 166, Jian Yi Road, Chungho City, Taipei, 235 Taiwan,
R.O.C.
Please inform or FAX us of your detailed information for a prompt, satisfactory
and constant service. Detailed Company Information
Company/Organization
Contact Person
E-mail Address
Address
Country
TEL FAX
Web Sit Questions
Product Model
Environment to Use OS
Computer Brand
M/B : CPU :
Chipset : Bios :
Video Card :
Network Interface Card :
Other :
Challenge Description
Suggestions to ADLINK

Contents
•
i
Contents
Chapter 1 Introduction................................................1
1.1 Specifications.....................................................................1
1.2 Applications.......................................................................2
1.3 Software Supporting...........................................................3
1.3.1 Programming Library.....................................................................3
1.3.2 ACLS-LVIEW: LabView Driver.....................................................3
Chapter 2 Installation.................................................4
2.1 What You Have ...................................................................4
2.2 Unpacking ..........................................................................4
2.3 Layout of PET-48DIO..........................................................5
2.4 Jumper and DIP Switch Description ...................................5
2.5 Setting Base Address.........................................................6
2.6 Pull-Up and Pull-Down Setting ...........................................8
2.7 Optp-22 Pin-2 & Pin-4 Configuration Setting ....................10
2.8 Interrupt IRQ Level Setting...............................................11
2.9 Timer & Event Interrupt Setting ........................................11
2.9.1 Timer Interrupt Setting JP10......................................................12
2.9.2 Event Counter Setting JP11.......................................................12
2.9.3 Timer Clock Source Setting JP12.............................................13
2.10 Programmable Interrupt Setting.......................................14
2.11 Connectors.......................................................................16
Chapter 3 Control Programming...............................19
3.1 PET-48DIO Software Library Installation ..........................19
3.2 8255 Mode 0......................................................................20
3.3 Register Structure ............................................................21
3.4 Programming for PET-48DIO............................................23
3.4.1 Programming in Assembly Langrage......................................23
3.4.2 Programming in C language ......................................................26
3.4.3 A Complete Example Program for Interrupt Handling........29
Product Warranty/Service.........................................32

How to Use This Guide
This manual is designed to help you use the 7248/96 series products.
It describes how to modify and control various functions on the cards
to meet your requirements. It is divided into five chapters:
•Chapter 1, "Introduction," gives an overview of the product features.
applications, and specifications.
•Chapter 2, "Installation," describes how to install the 7248/96
series products. The layout of are shown, the jumper settings, the
connectors specifications, and the notes for installation are
described.
•Chapter 3, "Register Structure & Format," describes the low-level
register structure and format ofthe PCI-7224/7248/7296.
•Chapter 4, "Operation Theorem" describes more details about the
versatile functions, including DIO, timer / counter, and interrupt
systems.
•Chapter 5, "Software Library" specifies the software library of C
language under DOS environment that makes you can operate the
functions on this card easily.

Introduction
•
1
1
Introduction
The PET-48DIO is a digital input / output add-on card with 48
programmable I/O ports for IBM PC or compatibles. In addition to
programmable I/O ports, an event counting and a timer pacer for
interrupt are also included. The 48 programmable input / output ports
are divided into two 24 programmable input / output ports for each
group. Its pin assignment is fully compatible with opto-22 standard.
The features of the PET-48DIO include an event counter to count
events that come from input port, a timer pacer for interrupt trigger,
and four input ports can be as programmable real time interrupt
source. These functionality make the PET-48DIO are very powerful to
support complex digital I/O control applications.
Only two bytes of I/O address are occupied by PET-48DIO, it lets
more cards can be installed in one system. All digital input / output
ports are TTL compatible and use the 74LS244 as driver and buffer
circuit to provide higher driving capacity for outputs and lower loading
current for inputs than regular TTL circuit.
1.1 Specifications
ØGeneral Specification
l48 programmable input / output ports
lHigh output driving capacity
lLow input loading
lOne 16-bit programmable event counter
lOne 32-bit programmable timer pacer
lInterrupt IRQ : IRQ3, ..., IRQ15 (9 levels jumper selectable)
ØDigital Input
lLogic level 0 : From-0.5 V to 0.8 V

2
•
Installation
lLogic level 1 : From 2.0 V to5.0 V
lInput loading: 0.2 mA at 0.4 V
lInput hysteresis: From 0.2 V to 0.4 V
lFrequency Response: 500 KHZ
ØDigital Output
lCurrent sink of logic level 0 : 24 mA Max,
lCurrent source of logic level 1 : 15 mA Max.
lDriving capacity : 15 TTL's gate
lFrequency Response: 500 KHZ
ØProgrammable Event counter
lFrequency Response : DC to 2 MHZ
lCounter ranger : From 1 to 65536
lTrigger edge : Rising edge or falling edge
ØProgrammable Timer Pacer
lClock frequency : 32.768 KHZ or 2 MHZ
lFrequency divider : Programmable
lCounter : 32-bit ( two 16-bit counters cascaded together)
ØSource of Interrupt
lEvent counter count up
lTimer time out
lInput from ports
1.2 Applications
ØDigital Input
lContact closure monitoring
lSwitch status monitoring
lBCD interface receiver
lDigital signal interface
ØDigital Output
lIndustrial ON / OFF control
lDigital signal interface
lBCD interface driver

Introduction
•
3
1.3 Software Supporting
1.3.1 Programming Library
For the customers who are writing their own programs, we provide
MS-DOS Borland C/C++ programming library which is included in the
ADLINK all-in-one CD.
ACLS-DLL1 is the Development Kit for NuDAQ ISA-Bus Cards with
digital I/O, Windows 3.1/95/98/NT. ACLS-DLL1 can be used for many
programming environments, such as VC++, VB, Delphi.
The ACLS-DLL1 included in the ADLINK CD is 2-hour demo version,
you can install it without series code and use it for 2 hours. Please
contact with your dealer to purchase the formal version.
1.3.2 ACLS-LVIEW: LabView Driver
The ACLS-LVIEW includes the PET-48DIO’s, which is used to
interface with NI’s LabView software package. The ACLS-LVIEW
supports Windows-95/98/NT.

4
•
Installation
2
Installation
This chapter describes how to install the PET-48DIO in your PC
system.
2.1 What You Have
In addition to this User's Manual, the package includes the following
items:
ØPET-48DIO 48-bit DIO Event, and Timer Board
ØADLINK CD
If any of these items is missing or damaged, contact the dealer from
whom you purchased the product. Save the shipping materials and
carton in case you want to ship or store the product in the future.
2.2 Unpacking
Your PET-48DIO card contains sensitive electronic components that
can be easily damaged by static electricity.
The card should be done on a grounded anti-static mat. The operator
should be wearing an anti-static wristband, grounded at the same
point as the anti-static mat.
Inspect the card module carton for obvious damage. Shipping and
handling may cause damage to your module. Make sure there are no
shipping and handling damages on the module before processing.
After opening the card module carton, extract the system module and
place it only on a grounded anti-static surface component side up.

Installation
•
5
Again inspect the module for damage. Press down on all the socketed
IC's to make sure that they are properly seated. Do this only with the
module place on a firm flat surface.
Note: DO NOT APPLY POWER TO THE CARD IF IT HAS BEEN DAMAGED.
You are now ready to install your PET-48DIO
2.3 Layout of PET-48DIO
This card has 14 jumpers, 2 connectors and 1 DIP switch, and their
positions areshown in the figure 2.1 below.
JP1
JP2
JP3
JP6
JP7
JP8
CN1
CN2
SW1
JP5
JP4
JP9
JP10
JP11
JP12
JP13
JP14
Fig 2.1 Layout of PET-48DIO
2.4 Jumper and DIP Switch Description
You can change the PET-48DIO channels and the base address by
setting jumpers and DIP switches on the card. The card's jumpers and
switches are preset at the factory. You can change the jumper
settings for your own applications.
A jumper switch is closed (sometimes referred to as "shorted") with the
plastic cap inserted over two pins of the jumper. A jumper is open with
the plastic cap inserted over one or no pin(s) of the jumper.

6
•
Installation
2.5 Setting Base Address
You can change the PET-48DIO's I/O port address by setting Dual in
Line Package switch (SW1) on the board. Under normal
circumstances, you should not need to change the switch settings.
PET-48DIO requires two consecutive address locations in I/O address
space. The base address of the PET-48DIO is restricted by the
following conditions.
1. The base address must be within the range 000hex to 3FBhex.
2. The base address should not conflict with any PC reserved I/O
address. see Appendix A.
3. The base address must not conflict with any add-on card on your
own PC. Please check your PC before installing the PET-48DIO.
The PET-48DIO's I/O port base address is selectable by an 8 position
DIP switch SW1. The default base address setting is Hex 300 is
illustrated as Figure 2.2 below. All possible base addresses for I/O
port from Hex 000 to Hex 3FB are described in Table 2.1 on next page.
123456 7 8 9 10
ON
SW1 Default Base Address = 300H
(A9 A8 A7 A6 A5 A4 A3 A2 A1 )
Figure 2.2: Default Address Setting
I/O address setting shows as table below:
SW1-1 ----------------- SW1-9SW 1-10
I / O based address setting NC

Installation
•
7
Functionality of SW1
I/O port
address(Hex) 1
A9 2
A8 3
A7 4
A6 5
A5 6
A4 7
A3 8
A2 9
A1
000-001 ON
(0) ON
(0) ON
(0) ON
(0) ON
(0) ON
(0) ON
(0) ON
(0) ON
(0)
002-003 ON
(0) ON
(0) ON
(0) ON
(0) ON
(0) ON
(0) ON
(0) ON
(0) OFF
(1)
004-005 ON
(0) ON
(0) ON
(0) ON
(0) ON
(0) ON
(0) ON
(0) OFF
(1) ON
(0)
:
300-301
(* default) OFF
(1) OFF
(1) ON
(0) ON
(0) ON
(0) ON
(0) ON
(0) ON
(0) ON
(0)
:
3FC-3FD OFF
(1) OFF
(1) OFF
(1) OFF
(1) OFF
(1) OFF
(1) OFF
(1) OFF
(1) ON
(0)
3FE-3FF OFF
(1) OFF
(1) OFF
(1) OFF
(1) OFF
(1) OFF
(1) OFF
(1) OFF
(1) OFF
(1)
(*) : default setting
ON : 0 OFF : 1.
A1, ... A9 are correspond to PC address lines.
Table 2.1 I/O Base Adress Table

8
•
Installation
2.6 Pull-Up and Pull-Down Setting
The input / output ports of PET-48DIO emulate as two Intel 8255
general purpose programmable peripheral interfaces(PPI). Figure 2.2
shows PET-DIO48's I/O ports equally block diagram.
PC0
PB0
PA0
PC1
PB1
PA1
#2 8255
#1 8255 CN2
CN1
Figure 2.3 I / O port's block diagram
There are six build-in jumpers on PET-48DIO for pull up and pull down
the I/O ports. The PET-48DIO can pull up PA, PB, PC to +5V, and pull
down PA, PB, and PC to ground.A typical application where pull up
resistors are used to monitor switch closure.
One network( Figure 2.4) is associated with each group of line. These
networks can be quickly connected to a voltage source (pull up) or
ground (pull down) through on board jumper setting.
The Pull-Up and Pull-Down configuration of each port is set by the
jumper JP1, JP2, JP4, JP6, JP7, and JP9, respectively. The port
configuration and its corresponding jumper are listed in below table.

Installation
•
9
Figure 2.4 Pull-up/Pull-Down Network
Connector I/O Port Jumper
PB1 JP1
CN1 PC1 JP2
PA1 JP4
PB0 JP6
CN2 PC0 JP7
PA0 JP9
Table 2.2 Jumper for Pull-Up/Pull-Down Setting
( Jumper settting of for JP1, JP2,JP4, JP6, JP7, and JP9)
Pull-up to +5V
(Default Setting)
Pull-down to Ground
No Pull-up or Pull-down
GND
+5V JPn

10
•
Installation
2.7 Optp-22 Pin-2 & Pin-4 Configuration Setting
port C data 7
port C data 6
Port C data 5
Port C data 4
Port C data 3
+12V
JP3/JP8
Figure 2.5 Connector of CN1 and CN2
The pin-2 and pin-4 of CN1 and CN2 can be configuration as +12V or
Ground (GND). The JP3 and JP8 are used for the configuration of
CN1 and CN2, respectively. The jumper settings are illustrated as
below.
JP3 for CN1
JP8 for CN2
Opto-22 Connector CN1 pin
connect to +12V
Opto-22 Connector CN1
pin connect to ground (default)
Opto-22 Connector CN2
pin connect to +12V
Opto-22 Connector CN2
pin connect to ground (default)

Installation
•
11
2.8 Interrupt IRQ Level Setting
The PET-48DIO can connect to any one of the interrupt lines of the
PC I/O channel. The interrupt line is selected by the jumper JP5. If you
wish to use the interrupt capability of the PET-48DIO, you must select
an interrupt level and place the jumper in the appropriate position to
enable the particular interrupt line.
The default interrupt level is IRQ5, which is selected by placing the
jumper on the pins in row number 5. Figure 2.6 shows the default
interrupt jumper setting IRQ5. You should only remove the jumper
from IRQ5 to other pins, if you want to change to another IRQ level.
Note : Be aware that there is no other add-on card shares the same
interrupt level at the same system.
No Interrupt:
Interrupt level:
IRQ 5
(default setting)
JP5
3 4 5 7 9 10 1112 15
IRQ X
JP5
3 4 5 7 9 10 11 12 15
IRQ X
Figure 2.6 Default Interrupt Setting
2.9 Timer & Event Interrupt Setting
The PET-48DIO has an interval timer/counter 8253 on board. It offers
3 independent 16-bit programmable down counters; counter 1 and
counter 2 are cascaded together for timer pacer trigger. and counter 0
is for event counting. Figure 2.7 shows the 8253 timer / counter
connection.

12
•
Installation
Counter 0
Counter 1
Counter 2
CLK0
GATE0 OUT0
CLK1
GATE1
CLK2
GATE2
OUT1
OUT2
2MHz
Oscillator
Vcc
Event IRQ
8253 Timer/Counter
PC0 ( CN2)
32.768 KHz
Vcc
Timer IRQ
JP11
JP10
JP12
Figure 2.7 Block Diagram of 8253 Timer/Counter
2.9.1 Timer Interrupt Setting JP10
The jumper JP10 is used for enabling or disabling timer interrupt,
and the default jumper setting is illustrated as below.
2.9.2 Event Counter Setting JP11
The JP11 is for enabling or disabling event counter interrupt.
Note: PC0 D0 (first bit of PC0) is the input port of event counter.
Disable timer interrupt
Enable timer interrupt
(Default setting)
Disable event counter interrupt
(Default setting)
Enable event counter interrupt
(Default setting)

Installation
•
13
2.9.3 Timer Clock Source Setting JP12
The JP12 is for select timer clock source. The range of timer is
depend on clock source, PET-48DIO has two clock sources for timer,
and setting range shows as table.
Clock source Timer setting range
32.768 KHZ 0.000122 sec ~ 131072 sec
2 MHZ 0.000002 sec ~ 2147.4836 sec
The following equation is to calculate timer setting range.
Timer range = 1 / (Timer Clock source / (Divide 1* Divide 2))
Divide 1 is loading data of 8253 counter 1.
Divide 2 is loading data of 8253 counter 2.
For example:
Clock source is 32.768 KHZ. Set timer to 0.0122 Sec.
0.0122=1/(32768/(Divide 1*Divide 2))
(Divide 1*Divide 2)=400
Let Divide 1=2-> Hex0002 So Divide 2=200-> Hex 00C8
Select 32.768KHz
Select 2 MHz
(Default setting)

14
•
Installation
2.10 Programmable Interrupt Setting
The PC0D3 and PC0D7 are two real time interrupt input ports. JP13 is
for PC0D3 and PC0D7 interrupt control setting.
PC0D3 to generate an interrupt when
input is
PC0D3 & PC0D7 as programmable
interrupt input refer to the table below
1
3
5
Disable PC0D3 & PC0D7 as interrupt
input ports ( factroy default)
PC0D3 PC0D7 GENERATE AN
INTERRUPT
RISING EDGE 0YES
FALLING EDGE 0NO
DON'T CARE 1NO
0DON'T CARE NO
1FALLING EDGE YES
1RISING EDGE NO
PC0D3 & PC0D7 programmable interrupt table
Table of contents
Other NuDAQ Computer Hardware manuals
Popular Computer Hardware manuals by other brands

Renesas
Renesas M16C FAMILY Hardware manual

Thermaltake
Thermaltake V3 Black Edition VL8000 Series user manual

Alphacool
Alphacool Eisblock ES Acetal Nvidia Geforce RTX 2080 2080Ti M02 (2070 & 2080... manual

AXIOMTEK
AXIOMTEK eBOX532-100-FL Series Quick installation guide

DFI
DFI CMS101 quick reference

InnoSenT
InnoSenT ITR-3800 user manual