ICS Advent DIO24-P User manual

Model DIO24-P
Product Manual
MANUAL NUMBER : 00431-024-14B

Page - iii
FOREWORD
This product manual provides information to install, operate and or program the referenced product(s)
manufactured or distributed by ICS Advent. The following pages contain information regarding the
warranty and repair policies.
Check our Web site (www.icsadvent.com) for technical information, manuals, and BIOS updates.
Technical assistance is also available at: 800-480-0044 (U.S.) or 858-677-0877 (international).
Customer Comments: If you experience any problems with this manual or just want to provide some
feedback, please send us a message using the online "Service Form" on our Web site (www.icsadvent.com)
under "Support." Detail any errors you find. We will correct the errors or problems as soon as possible and
post the revised manual in our online Support Library. Thank you.
The information in this document is provided for reference only. ICSAdvent does not assume any liability
arising from the application or use of the information or products described herein. This document may
contain or reference information and products protected by copyrights or patents and does not convey any
license under the patent rights of ICS Advent, nor the rights of others.
Copyright © 1995, a California Corporation, 6260 Sequence Drive, San Diego, CA92121-4371. ICSAdvent
is a Registered Trademark of ICS Advent. All trademarks and registered trademarks are the property of
their respective owners. All rights reserved. Printed in the United States of America. No part of this publi-
cation may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, elec-
tronic, mechanical, photocopying, recording , or otherwise, without the prior written permission of the pub-
lisher.

Page - iv
This page intentionally left blank

Page - v
Shipments not in compliance with this Guarantee
and Limited Warranty Return Policy will not be ac-
cepted by ICS Advent.
Guarantee
A thirty day money-back guarantee is provided on all standard products sold. Special order products are
covered by our Limited Warranty, however they may not be returned for refund or credit. EPROMs,
RAM, Flash EPROMs or other forms of solid electronic media are not returnable for credit - but for
replacement only. Extended Warranty available. Consult factory.
Refunds
In order to receive a refund on a product for the purchase price, the product must not have been
damaged by the customer or by the common carrier chosen by the customer to return the goods and
the product must be returned complete (meaning all manuals, software, cables, etc.) within 30 days of
receipt and in an as-new and resalable condition. The Return Proceduremust be followed to assure
prompt refund.
Restocking Charges
Product returned after 30 days, and before 60 days, of the purchase will be subject to a minimum20%
restocking charge and charges for any damaged or missing parts. Products not returned within 60
days of purchase, or products which are not in an as-new and re-saleable condition, are not eligible
for credit return and will be returned to the customer.
Limited Warranty
Effective April 1, 1998, all products carry a 2-year limited warranty. Within two years of purchase,
ICS Advent will repair or replace, at our option, any defective product. ICS Advent will service the
warranty for all standard catalog products for the first two years from the date of shipment.
Please note: The 2-year warranty may not apply to special promotion items. Please consult the factory for
warranty verification.
The limited warranty is void if the product has been subjected to alteration, neglect, misuse, or abuse; if any
repairs have been attempted by anyone other than ICS Advent or its authorized agent; or if the failure is
caused by accident, acts of God, or other causes beyond the control of ICS Advent or the manufacturer.
Neglect, misuse, and abuse shall include any installation, operation, or maintenance of the product other than
in accordance with the user’s manual.
No agent, dealer, distributor, service company, or other party is authorized to change, modify, or extend the
terms of this Limited Warranty in any manner whatsoever. ICS Advent reserves the right to make changes
or improvements in any product without incurring any obligation to similarly alter products previously
purchased.

Page - vi
Return Procedure
For any Guarantee or Limited Warranty return, please contact ICS Advent's Customer Service at
800-480-0044 (U.S.) or 858-677-0877 (international) and obtain a Return Material Authorization (RMA)
Number. All product(s) returned to ICS Advent for service or credit must be accompanied by a Return
MaterialAuthorization (RMA) Number. Freight on all returned itemsmust be prepaid by the customer who
is responsible for any loss or damage caused by common carrier in transit. Returns for Warranty must
include a Failure Report for each unit, by serial number(s), as well as a copy of the original invoice showing
date of purchase.
To reduce risk of damage, returns of product must be in an ICS Advent shipping container. If the original
container has been lost or damaged, new shipping containers may be obtained from ICS Advent Customer
Service at a nominal cost.
ICS Advent owns all parts removed from repaired products. ICS Advent uses new and reconditioned parts
made by various manufacturers in performing warranty repairs and building replacement products.
If ICS Advent repairs or replaces a product, its warranty term is not extended.
ICSAdvent will normally return your replacement or repaired items via Second DayAir. Overnight delivery
or delivery via other carriers is available at an additional charge.
Limitation of Liability
In no event shall ICS Advent be liable for any defect in hardware, software, loss, or inadequacy of data of
any kind, or for any direct, indirect, incidental, or consequential damages in connection with or arising out of
the performance or use of any product furnished hereunder. ICSAdvent liability shall in no event exceed the
purchase price of the product purchased hereunder. The foregoing limitation of liability shall be equally
applicable to any service provided by ICSAdvent or its authorized agent.
Some Sales Items and Customized Systems are not subject to the guarantee and limited warranty.
However in these instances , any deviations will be disclosed prior to sales and noted in the original invoice.
ICS Advent reserves the right to refuse returns or credits on software or special order items.

Page - vii
Advisories
Three types of advisories are used throughout the manual to stress important points or warn of potential
hazards to the user or the system. They are the Note, the Caution, and theWarning. Following is an example
of each type of advisory:
Note: The note is used to present special instruction, or to provide extra information which may
help to simplify the use of the product.
CAUTION!
A Caution is used to alert you to a situation which if ignored may cause injury or
damage equipment.
WARNING!
AWarningisusedtoalertyouofasituationwhichifignoredwillcauseseriousinjury.
Cautions and Warnings are accented with triangular symbols. The exclamation symbol is used in all cautions
and warnings to help alert you to the important instructions. The lightning flash symbol is used on the left
hand side of a caution or a warning if the advisory relates to the presence of voltage which may be of
sufficient magnitude to cause electrical shock.
Use caution when servicing any electrical component. We have tried to identify the areas which may pose
a Caution or Warning condition in this manual; however, ICS Advent does not claim to have covered all
situations which might require the use of a Caution or Warning.
You must refer to the documentation for any component you install into a computer system to ensure proper
precautions and procedures are followed.

Page - viii
This page intentionally left blank

Page - ix
Table of Contents
Chapter 1: Introduction.............................................................................................1-1
Description ........................................................................................................................................ 1-1
Features ............................................................................................................................................ 1-1
Applications....................................................................................................................................... 1-1
Howto remain CECompliant ............................................................................................................. 1-2
Specifications .................................................................................................................................... 1-3
Environmental: ............................................................................................................... 1-3
Inputsand Outputs......................................................................................................... 1-3
Chapter 2: Installation ...............................................................................................2-1
HardwareInstallation.......................................................................................................................... 2-1
Setting BaseAddress ........................................................................................................................ 2-2
Interrupts ........................................................................................................................................... 2-2
Connector PinAssignments........................................................................................................ 2-3
Chapter 3: Programming ..........................................................................................3-1
RegisterAccess ................................................................................................................................ 3-1
ControlRegister ................................................................................................................................. 3-2
8255ModeDefinitionFormat.................................................................................................................... 3-2
ModesofOperation ........................................................................................................................... 3-2
Mode0........................................................................................................................................ 3-2
Mode1........................................................................................................................................ 3-3
Mode2........................................................................................................................................ 3-3
Bit Set/Reset..................................................................................................................................... 3-3
Bit Set/Reset Format ............................................................................................................................... 3-3
Chapter 4: Peek and Poke Driver..............................................................................4-1
UsingtheLibrary ............................................................................................................................... 4-1
Visual Basic Declaration Syntax................................................................................................. 4-3
Installingthe Windows NTPeek andPoke Driver ............................................................................... 4-4
Installingthe Windows 95Peek and PokeDriver................................................................................ 4-5
DeletingAdditionalCopies ofthe Windows95 Peek andPoke Driver ......................................... 4-5
PeekandPokeDriverTroubleshooting ............................................................................................... 4-6
Appendix A: 8255 Data Sheet .................................................................................. A-1
Appendix B: Pinout Drawing................................................................................... A-1

Page - x
CE Declaration of Conformity
List of Figures
Figure1: DIO24-PBlock Diagram ........................................................................................................... 1-2
Figure2: DIO24Layout ........................................................................................................................... 2-3
List of Tables
Table 4-1: Peek and Poke Library Functions ........................................................................................... 4-2
Current Revision 14B
December 2000

Chapter 1: Introduction
Manual Number: 00431-024-14 Page 1-1
Chapter 1: Introduction
Description
The DIO24-P parallel digital I/O card provides 24 TTL/DTL compatible digital I/O lines, interrupt
input and enable lines and external connections to the IBM PC bus power supplies. It is a flexible
interface for parallel input/output devices such as instruments and displays and user contructed
systems and equipment.
24 digital I/O lines are provided through an 8255-5 programmable peripheral interface (PPI) IC.
These 24 lines are divided into three 8-bit ports, PA, PB, and PC. The PC port may also be further
divided into two 4-bit ports PC-Upper and PC-Lower. Each of the ports may be configured as an
input or an output by software control according to the contents of a write only register in the 8255.
Each port may be read as well as written to. In addition, the 8255 has other modes of operation that
allow unidirectional and bidirectional strobed I/O where the PC ports are used for control of data
transfer and interrupt generation, etc. Refer to the 8255 data sheet located at the back of this manual
for a complete technical description and summary of the various operating modes of the 8255.
Interrupt handling is via a tristate driver with separate enable (interrupt enable - active low). This
may be connected to any of the interrupt levels 2-7 available on the IBM PC bus by means of a plug
type jumper on the board. Handling of an interrupt is controlled by the 8259 interrupt controller on
the PC and this is set by the BIOS on system initialization to respond to their requirements and set up
corresponding interrupt handlers.
Power from the computer bus is available on the connector. Users should observe the current capac-
ity limits of the bus. 1A fuses are provided on all power outputs.
The board format is half-size and will fit in any full or half-length slot in a PC/XT/AT or compatible
computer running at any clock speed. Various termination boards are available such as the Indus-
trial Computer Source Model UTB-K.
Features
24 Channels of Digital Input/Output
Four and Eight Bit Ports Independently Selectable for I/O
Unidirectional/Bidirectional Strobed I/O
Hysteresis on I/O Lines
Interrupt Handling
Applications
Security Systems, Energy Management
Relay Monitoring and Control
Parallel Data Transfer to PC
Sensing Switches or Signals, or TTL, DTL, CMOS Logic
Driving Indicator Lights or Recorders

Manual Number: 00431-024-14Page 1-2
DIO24-P Manual
How to remain CE Compliant
In order for machines to remain CE compliant, only CE compliant parts may be used. To keep a
chassis compliant it must contain only compliant cards, and for cards to remain compliant they must
be used in compliant chassis. Any modifications made to the equipment may affect the CE compli-
ance standards and should not be done unless approved in writing by Industrial Computer Source.
The Model DIO24-P is designed to be CE Compliant when used in an CE compliant chassis.
Maintaining CE Compliance also requires proper cabling and termination techniques. The user is
advised to follow proper cabling techniques from sensor to interface to ensure a complete CE Com-
pliant system. Industrial Computer Source does not offer engineering services for designing cabling
or termination systems. Although Industrial Computer Source offers accessory cables and termina-
tion panels, it is the user's responsibility to ensure they are installed with proper shielding to maintain
CE Compliance.
Figure 1: DIO24-P Block Diagram

Chapter 1: Introduction
Manual Number: 00431-024-14 Page 1-3
Specifications
Size:
Half Slot
Environmental:
Operating Temperature:
0-60 deg. C
Storage Temperature:
-50 to +120 deg. C
Humidity:
0 to 90% non-condensing
Inputs and Outputs
Input/Output Lines:
24
Input Logic Low Voltage:
-0.5V Min to 0.8V Max
Input Logic High Voltage:
2.0V Min to 5.0V Max
Input Load Current:
-10uA Min to +10uA Max
Input Low Current, Interrupt Inputs:
-0.4mA
Input High Current, Interrupt Inputs:
20uA
Output Low Voltage:
0.45V Max
Output Low Current:
sink 1.7mA
Output High Voltage:
2.4V Min

Manual Number: 00431-024-14Page 1-4
DIO24-P Manual
Output High Current:
source 200uA
All outputs and inputs are TTL/DTL compatible and outputs will drive 1 standard TTL load or
4 LSTTL loads. CMOS compatiblity can be obtained by connecting a 10k Ohm pullup resistor
from the input or output to +5V.
I/O Address Requirement:
4 Bytes
I/O Connector:
DB37 Male
Power Requirements:
170mA typical at +5V
Agency Approvals
CE Conformity with:
EU EMC Directive 89/336/EEC
EU Low Voltage Directive 72/23/EEC

Chapter 2: Installation
Manual Number: 00431-024-14 Page 2-1
Chapter 2: Installation
Hardware Installation
The DIO24-P functions as a part of a complete computer monitoring or controlling system.
NOTE:
Installing or removing the DIO24-P board with power applied may cause physical damage to the
DIO24-P, the computer or both. Turn off the power before installing or removing the I/O boards.
The DIO24-P requires 4 consecutive address locations in the I/O space. Some I/O address locations
will be occupied by internal I/O and your other peripheral cards. To provide flexibility in avoiding
conflict with these devices, the I/O board address can be set by the base address DIP switch to be on
a 4-byte boundary anywhere in the decoded I/O space. This I/O address space extends from decimal
256 to 1023 (Hex 100 to 3FF) which is many times larger than is ever likely to be fully occupied.
Such a large space also allows use of more than one DIO24-P in the same computer. Some of the
address locations commonly used are listed in the table that follows. Refer to the IBM Technical
Reference Manual for additional details.
ADDRESS DEVICE ADDRESS DEVICE
000-0FF Internal I/O 378-37F Parallel Printer
1F0-1FF Hard Disk (AT) 380-38F SDLC Comm.
200-20F Game Port 3A0-3AF SDLC Comm
210-217 Expansion Unit 3B0-3BB Mono Display
220-24F Reserved 3BC-3BF Parallel Printer
278-27F Parallel Printer 3C0-3CF Reserved
2F0-2F7 Reserved 3D0-3DF Color Graphics
2F8-2FF Serial Port 3E0-3E7 Reserved
300-31F Prototype Card 3F0-3F7 Floppy Disk
320-32F Hard Disk (XT) 3F8-3FF Serial Port
This covers the standard IBM I/O options, but if you have other I/O peripherals e.g. special hard
disk drives, special graphics boards, prototype cards, other analog and digital I/O etc., they may be
using other I/O addresses. Memory addressing is separate from I/O addressing so there is no pos-
sible conflict with any add-on memory that you may have in your computer.
Usually, a good choice is to put the DIO24-P at base address Hex 280 (decimal 640) or Hex 300
(decimal 768). Note that the IBM Prototype card is address at Hex 300 and would conflict if
installed.

Manual Number: 00431-024-14Page 2-2
DIO24-P Manual
Setting Base Address
It is easier to think in hexadecimal when determining I/O address. This avoids the decimal-to-hex or
decimal-to-binary conversion required to set the switch. The following example shows how to set
the switches:
1. Desired I/O address: &Hex 300
2. Binary value of address &Hex number
&Hex 300 = 0011 0000 0000 Binary
3. Set switches with ON = 0 and OFF = 1. The lower 2 bits are factory set and are discarded while
the upper two bits are always 0 and are not provided for on the switch. The switch is then set to
(for Hex 300):
The switch positions mirror the bit pattern above with OFF = 1 = DOWN.
Interrupts
The DIO24-P provides for input channels 22 and 23 to generate hardware interrupts. These inter-
rupts can be directed to any of the Interrupt Request Lines (IRQ 2, 3, 4, 5, 6, and 7) available on the
8-bit PC/XT/AT I/O expansion bus.
Pin 1 (Channel 23 is configured as an INTERRUPT INPUT and Pin 3 (Channel 22) is the INTER-
RUPT ENABLE on the DB37 connector. To use the interrupts, simply insert the appropriate IRQ
jumper to select the desired interrupt channel. To determine which input generated the interrupt, read
Port C Upper, bits 6 and 7, to read the current state of the inputs.
Jumper block J2 allows the user to customize the interrupt inputs to use pins 1 and 2 of the I/O
connector. These jumpers are not normally used and interested users are directed to the schematic
for additional details.
You should be aware that an interrupt will be generated if the IRQ jumper is inserted and Port C
Upper is used as an output. This feature could be used to test an interrupt routine without external
connections being required.

Chapter 2: Installation
Manual Number: 00431-024-14 Page 2-3
Figure 2: DIO24 Layout
Connector Pin Assignments
All digital I/O is through a standard DB37 male connector. A listing of all pinouts is shown on the
schematic included in this manual.

Chapter 3: Programming
Manual Number: 00431-024-14 Page 3-1
Chapter 3: Programming
The DIO24-P uses the 8255 PPI to provide the 24 bits of input and output. These I/O are divided
into three ports, A, B, and C. Port C is further divided into two 4-bit ports, C-Lower and C-Upper.
The 8255 provides a Control Register at the cards base address+3. This is a write only, 8-bit
register and is used to set the Mode and Direction of these 4 ports. On power-up or reset, all 24 I/
O lines are set as inputs. The 8255 should be configured by writing to the Control Register before
the chips ports are accessed, even as inputs.
Register Access
The DIO24-P is mapped into 4 bytes on any four byte boundary in the IBM I/O space. The address
definitions are:
BASE ADDRESS+ 0 Port A Read/Write
1 Port B Read/Write
2 Port C Read/Write
3 Control Register Write Only
To access the board from BASIC, for example:
1. Determine which ports are to be used for input and which for output. Determine the proper bit
pattern to write to the Control Register as discussed in the following section.
For example, a configuration of:
Port A Input
Port B Output
Port C-Upper Input
Port C-Lower Output
would have a bit pattern of 1001 1000 (Hex 98). Use the BASIC OUT command to write to the
Command Register:
10 BASEADDR = &H300
20 OUT BASEADDR+3, &H98
2. Port A and the upper 4 bits of Port C would be input ports and would be read. Port B and the
lower 4 bits of Port C would be outputs and would be written to:
30 X=INP(BASEADDR):Y=INP(BASEADDR+2) ‘READ PORTS A,C
40 PRINT X,Y ‘PRINT THE VALUES
50 OUT BASEADDR+1,255 ‘TURNON ALL PORT B
60 OUT BASEADDR+2,15 ‘TURNON 4 BITS OF C

Manual Number: 00431-024-14Page 3-2
DIO24-P Manual
Control Register
The 8255 has several input/output modes and the user is directed to the 8255 data sheet, included
with this manual, for complete programming details. The following information will provide suf-
ficient information for the majority of users.
Before the 8255 can be used, it must be configured. Each of the 8-bit ports A, B, and C can be
selected as input or output ports and port C can also be selected as a control port. Note that the
8255 power-up default mode is with all ports configured for inputs and the chip can be used in that
mode, although it is a good practice to reconfigure the chip for this mode even if that is the one
you intend to use.
8255 Mode Definition Format
Modes of Operation
The 8255 offers 3 MODES of operation as set by bits 3, 6 and 7. Bit 3 sets the mode for port B and
bits 6 & 7 for port A. Port C has no independent modes. The modes are described below (Mode 1
and 2 descriptions are provided for information only):
MODE 0 - Basic Input/Output - This is the standard PCDIO mode
MODE 1 - Strobed Input/Output
MODE 2 - Bi-directional Bus
Mode 0
This functional configuration provides simple input and output operations for each of the three
ports. No handshaking is required, data is simply written to or read from a specified port.
Mode 0 Basic Functional Definitions:
Two 8-bit ports and two 4-bit ports
Any port can be input or output
Outputs are latched
Inputs are not latched
16 different Input/Output combinations are possible in this mode

Chapter 3: Programming
Manual Number: 00431-024-14 Page 3-3
Mode 1
This functional configuration provides a means for transferring I/O data to or from a specified port
in conjunction with strobes or handshaking signals. In Mode 1, Port A and Port B use the lines
on Port C to generate or accept these handshaking signals.
Mode 1 Basic Functional Definitions
Two Groups (Group A and Group B)
Each group contains one 8-bit data port and one 4-bit control/data port
The 8-bit data port can be either input or output. Both inputs and outputs are latched
The 4-bit port is used for control and status of the 8-bit data port
Mode 2
This functional configuration provides a means for communicating with a peripheral device or
structure on a single 8-bit bus for both transmitting and receiving data (bidirectional bus I/O).
Handshaking signals are provided to maintain proper bus flow discipline in a similar manner to
MODE 1. Interrupt generation and enable/disable functions are also available.
Mode 2 Basic Functional Definitions
Used in Group A only
One 8-bit, bidirectional bus port (Port A) and a 5-bit control port (Port C)
Both inputs and outputs are latched
The 5-bit control port (Port C) is used for control and status for the 8-bit, bi-directional bus port
(Port A)
Bit Set/Reset
Any of the eight bits of Port C can be Set or Reset using a single OUTput instruction. This feature
reduces software requirements in control-based applications.
When Port C is being used as status/control for Port A or B, these bits can be set or reset by using
the Bit Set/Reset operation just as if they were data output ports.
Bit 7 controls the Bit Set/Reset function. When bit 7=1 the port is a control port. When set to 0 the
Bit Set/Reset function is used.
Bit Set/Reset Format

Chapter4: Peek and Poke Driver
Manual Number: 00431-024-14 Page 4-1
Chapter 4: Peek and Poke Driver
The Peek and Poke driver for Windows 95/NT allows developers to write Win32 programs that
access hardware I/O ports and physical memory on Industrial Computer Source products. This
driver simplifies the testing of hardware components because they can be accessed without using a
specific driver for each product.
CAUTION!
The Peek and Poke driver gives application-level access to areas of the hardware and memory that
can crash the operating system or corrupt data. Take care to access only known memory or I/O
ports.
Using the Library
Two static libraries and two dynamic linked libraries are used to access the Peek and Poke driver
under Windows 95 or Windows NT:
pplib95.lib and pplibnt.lib
pplib95.dll, pplibnt.dll.
To use a library, add pplib95.lib or pplibnt.lib to your link, whichever is appropriate for the target
operating system. Include pplib95.h or pplibnt.h in the C/C++ file from which you will be accessing
the functions.
For Visual Basic, add pplib95.dll or pplibnt.dll to your external function declarations (refer to
Visual Basic Declaration Syntax, later in this section). These libraries are compatible with all
Microsoft compilers.
Note: To make sure that libraries are thread safe, you must use the ics_pp_open() call in your initial
thread, before creating any other threads. Then make sure that all other threads are terminated
before calling ics_pp_close().
Table 4-1 lists the functions of the Peek and Poke library.
Table of contents
Other ICS Advent Computer Hardware manuals
Popular Computer Hardware manuals by other brands

Advantech
Advantech SKY-MXM-A500 user manual

Moxa Technologies
Moxa Technologies ABC-02-USB-T Quick installation guide

Lucent Technologies
Lucent Technologies orinoco user guide

QSC
QSC DSP-4 Hardware manual

Advantech
Advantech PCE-7B17-00A1E Startup manual

Dialogic
Dialogic DM/V480A-2T1-PCI Quick install card