Contec PIO-16/16L(104) Owner's manual

Type
Owner's manual
PIO-16/16L(104)
Isolated Digital Input /Output Board
for PC/104
Users Guide
PIO-16/16L(104) i
Copyright
Copyright 1997 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 nor
for results obtained by the user as a result of using this product.
Trademarks
MS, Microsoft, MS-DOS and Windows are trademarks of Microsoft
Corporation. Other brand and product names are trademarks of their
respective holder.
PIO-16/16L(104)ii
Product Configuration
- PIO-16/16L(104) Board…1
- PIO-16/16L(104) User's Guide (this booklet)…1
Unpacking:
This board is specially packed in an anti-static bag to prevent
damage in shipping.
Check the contents to make sure that you have everything listed
above. If you do not have all the items, contact your distributor
or CONTEC group office where you purchased.
Note!
Do not remove the board from its protective packaging until the
computer case is open and ready for installation. Electrical static
can cause damage to electrical components.
PIO-16/16L(104) iii
Table of Contents
Copyright............................................................................i
Trademarks ........................................................................i
Product Configuration ..................................................... ii
1. Introduction .............................................................1
About the PIO-16/16L(104) Board...............................1
Limited Three-Year Warranty......................................2
How to Obtain Service..................................................2
Liability.........................................................................2
2. Setup ....................................................................... 3
Board Setup.......................................................................3
Components Location ...................................................4
Setting Base Address....................................................5
Setting Interrupt...........................................................7
Installing the PIO-16/16L(104) Board.........................9
External Connection.......................................................10
Electrical Interface .....................................................10
Opto-isolated Output Circuit Protection...................13
3. I/O Registers .......................................................... 15
Input/Output Registers by Standard Mode...................17
Input Data Group Access............................................17
Standard Interrupt.....................................................18
Output Data Group Access.........................................18
Input/Output Registers by Extended Mode...................19
Bit Access.....................................................................19
Group Access...............................................................21
Digital Filter Function of Input Channels................23
Handshake Mode........................................................26
4. System Reference.................................................... 29
Specifications:..................................................................29
Block Diagram.................................................................30
PIO-16/16L(104)iv
5. Troubleshooting...................................................... 31
Questions:........................................................................31
Is the pilot light on?....................................................31
Did the system boot up? .............................................31
Does your program work?...........................................31
Does the sample program work?................................32
Still have a problem?..................................................32
6. Index ..................................................................... 35
PIO-16/16L(104) v
List of Figures
Figure 2.1. Components Location................................................ 4
Figure 2.2. Default Base Address................................................ 5
Figure 2.3. JP1 Default Interrupt Setting ..................................... 7
Figure 2.4. JP1 Setting Example.................................................. 7
Figure 2.5. Example of Checking PC/104.................................... 8
Figure 2.6. Install the Board........................................................ 9
Figure 2.7. PIO-16/16L(104) Pin Assignment ........................... 10
Figure 2.8. Opto-isolated Input Circuitry....................................11
Figure 2.9. Opto-isolated Output Circuitry.................................11
Figure 2.10. STB signal Input Circuitry..................................... 12
Figure 2.11. ACK signal Output Circuitry................................. 12
Figure 2.12. Output Protection Circuits..................................... 13
Figure 3.1. PIO-16/16L(104) Address Mapping ........................ 15
Figure 3.2. PIO-16/16L(104)s Internal Registers for Extended
Mode...................................................................... 16
Figure 3.3. Input Port (Base Address +0H~3H)......................... 17
Figure 3.4. Output Port (Base Address +2H~3H) ...................... 18
Figure 3.5. Bit Access Registers................................................ 19
Figure 3.6. Group Access Registers........................................... 21
Figure 3.7. Principle of Digital Filter Function.......................... 23
Figure 3.8. Principle Filter Function Register............................ 23
Figure 3.9. Handshake Mode (Strobed Input) Waveform........... 26
Figure 3.10. Handshake Registers ............................................. 27
Figure 4.1. Block Diagram........................................................ 30
PIO-16/16L(104)vi
List of Tables
Table 2.1. Default Board Settings................................................ 3
Table 2.2. Reserved I/O Addresses.............................................. 6
Table 2.3. Output Protection Choices ........................................ 13
Table 3.1. Select Input/Output Group Port................................. 21
Table 3.2. Digital Filter Time Setting ........................................ 24
Table 4.1. Specifications............................................................ 29
Introduction
PIO-16/16L(104) 1
1. Introduction
About the PIO-16/16L(104) Board
The CONTEC PIO-16/16L(104) is a 32-channel opto-isolated
digital I/O board for the PC/104 bus that adds parallel I/O ports to a
PC/104-bus system.
PIO-16/16L(104) comes with 16 opto-isolated input lines (2 input
groups) and 16 opto-isolated open-collector output lines (2 output
groups) and is designed to work with low voltage external devices.
In addition, it has several extended functions such as Bit Access,
Group Access and Handshake mode.
For more information, see System Reference in Chapter 4.
Introduction
PIO-16/16L(104)2
Limited Three-Year Warranty
CONTEC Interface boards 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 prepaid with a copy of the original 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 boards. 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
consequential damages due to such defect or consequences that arise
from inexperienced usage, misuse, or malfunction of this device.
Setup
PIO-16/16L(104) 3
2. Setup
This section covers everything from getting a PIO-16/16L(104)
board out of the box to plugging it into your computer. It includes
instructions for setting base address and interrupt.
Board Setup
The PIO-16/16L(104) interface board is shipped from the factory
with the following settings:
Table 2.1. Default Board Settings
Function
Setting
Hardware
Base Address
500H SW1, SW2
Interrupt
Disable JP1
These settings are appropriate for many systems. However, you
must change these settings if your computer has another board that
uses the same base address. You can also connect a short plug on
JP 1 to serve as an interrupt line. The following pages contain
instructions for changing these settings of your board.
Setup
PIO-16/16L(104)4
Components Location
Figure 2.1. is a picture of the PIO-16/16L(104) board.
12345678
SW2
JP1
1 11
PIO-16/16L(104)
12345678
SW1
ASIC
CN1
Figure 2.1. Components Location
Setup
PIO-16/16L(104) 5
Setting Base Address
The base address for addressing the I/O ports of the PIO-
16/16L(104) board is set at the factory to address 500H. Figure
2.2. shows the position for the DIP-switches on SW1 and SW2
which set this address.
SW1 DIP-switch positions 1 through 8 correspond to address lines
A15 through A8 while SW2 positions 1 through 8 correspond to A7
through A0. The PIO-16/16L(104) base address must be set to an
even byte boundary where it can reserve 4 bytes of address space.
You do not need to set the least significant bit A0, A1. The unused
DIP-switch positions are seen by your PC system as zeroes.
A7 A6 A5 A4 A3 A2 A1 A0A15 A14 A13 A12 A11 A9 A8
1
2
3
4
5
6
7
8
O
F
F
SW1
1
2
3
4
5
6
7
8
O
F
F
SW2
A10
Figure 2.2. Default Base Address
Note!
I/O address, 0000H to 00FFH, are reserved for the system board
I/O. 0100H to FFFFH are available on the I/O channel. Table
2.2. shows the Hex addresses already used by other devices.
CONTEC recommends *300H, *700H, *B00H, and *F00H (where
* is any number from 0 to F) as valid base addresses. For more
information, please consult the technical reference manual for your
computer.
Caution!
When setting the base address above 400H, be sure to read the
following page.
Setup
PIO-16/16L(104)6
Table 2.2. Reserved I/O Addresses
Hex Range
01F0 - 01F8 Fixed Disk
0200 - 0207 Game Port
0278 - 027F Parallel Printer Port 2
02F8 - 02FF Serial Port 2
0300 - 031F Prototype Card
0360 - 036F Reserved
0378 - 037F Parallel Printer Port 1
0380 - 038F SDLC, Bisynchronous 2
03A0 - 03AF Bisynchronous 1
03B0 - 03BF Monochrome Display Adapter
03C0 - 03CF Reserved
03D0 - 03DF Color/Graph Monitor Adapter
03F0 - 03F7 Diskette Controller
03F8 - 03FF Serial Port 1
0790 - 0793 Cluster Adapter 1
0B90 - 0B93 Cluster Adapter 2
1390 - 1393 Cluster Adapter 3
2390 - 2393 Cluster Adapter 4
Device
Note!
Consult the I/O address map section of the IBM PC Technical
Reference Manual for further details on reserved addresses.
IBM recommends a device base address between 100H and 3FFH
only. You can assign your CONTEC board to a base address
beyond this recommended limit by adding 400H, 800H, or C00H to
the addresses listed in the table above.
Audio uses address space beyond 3FFH. These addresses may be
"shadows" into reserved address space between 100H and 3FFH
that can't be used. For example if 1F0H is reserved for a fixed
disk, and the disk drive controller card only sees the 10 least
significant (A0 ~ A9) address lines, then you can't use the
following: 1F0H, 5F0H, 9F0H, or DF0H. Writing to an address
like 1F0H or 5F0H would inadvertently activate the disk drive
controller board.
Setup
PIO-16/16L(104) 7
Setting Interrupt
Default Setting
The jumper pin on jumper block JP1 of the PIO-16/16L(104) board,
when connected, serves as a switch that assigns PC system
interrupts to an external interrupt line. The board is shipped as the
interrupt line disabled. Figure 2.3. shows this orientation.
JP1
Short plug
1 11
Figure 2.3. JP1 Default Interrupt Setting
Setting Interrupt Level
The PIO-16/16L(104) can issule one interrupt signal. To use an
interrupt, you must connect a jumper (short plug) on JP1. The
interrupt signal can be assigned to PC system interrupt level IRQ3
to IRQ7 (pin 11 to pin 7 on JP 1), IRQ9 to IRQ12 (pin 6 to pin 3 on
JP 1), IRQ14 and IRQ15 (pin 2 and pin 1 on JP 1). Figure 2.4. is
an example of connecting the signal to IRQ3.
JP1
1 11
IRQ 15 14 12 11 10 9 7 6 5 4 3
Figure 2.4. JP1 Setting Example
Interrupt Pin Assignment
The interrupt pin is assigned to pin B1(input line PI00) in the 50-pin
connector for the external interrupt signal line.
See PIO-16/16L (104) pin assignment in figure 2.7. for more
information.
Checking Available Interrupt
The PC/104 system has two interrupt controllers (CTLR 1 and
CTLR 2). CTLR 1 allows devices to handle interrupt level IRQ 3
~ IRQ 7, and CTLR 2 allows devices to handle interrupt level IRQ
9~IRQ 12, IRQ 14, IRQ 15 that are fed into IRQ 2 of CTLR 1.
Setup
PIO-16/16L(104)8
When an interrupt is enabled (the mask bit is set to 0), the next
interrupt of that level causes the interrupt controller to route control
to the device handler at the address found in the corresponding
entry in the vector table. Mask bits set to 1 have not yet been
reserved for interrupts and are available for use by your interrupt
handler.
To check the availability of interrupts on your system, use the
following C instructions to check the mask bit settings.
CTLR 1 CTLR 2
a = inp (0x21); a = inp (0xa1);
printf ("%x",a); printf ("%x",a);
This returns a hex number that represents the status of the mask
register for the 8259A programmable interrupt controllers (PIC) on
your PC motherboard. Convert this number to binary and match
the bits to the interrupt level shown in the example below.
1 1 0 1 1 0 0 0
7 6 5 4 3 0
0 = not available
1 = available
a: D8H
Interrupt level
1 1 0 1 1 0 0 0
9
a: D8H
Interrupt level
CTLR1
CTLR2
Figure 2.5. Example of Checking PC/104
If D8H is returned when you test CTLR 1 then levels 3, 4, 6, and 7
are available. If you test CTLR 2 then levels 11, 12, 14, and 15
are available.
Caution!
The test described above detects the presence of previously loaded
interrupt routines. Before you conduct this test you must install all
other I/O boards and their drivers. If your PC has software
packages that monitor or control external devices you should first
load (and then immediately quit) from these packages. This allows
the test program to see which interrupts have been registered by
these programs.
Setup
PIO-16/16L(104) 9
Installing the PIO-16/16L(104) Board
You need to install your PIO-16/16L(104) board to PC/104 system.
You will need a small screw driver to install the board and a non-
conductive tool to set the DIP-switches.
1. Turn the PC/104 system power switch off.
2. Inspect the board. Check the board for any visible damage or
loosened parts. If you notice any problems with the board,
contact CONTEC. Do not attempt to fix the board yourself.
CONTEC does not warranty boards damaged or worked-on by
customers.
3. Connect your board into the PC/104 BUS socket of your system.
4. Anchor the board with the screws and the locking washers.
Cable
Screw
Figure 2.6. Install the Board
5. Attach external cables. Use a 50-pin cable at both ends, to
connect your external devices to the 50-pin DUAL ROW BOX
HEADER on your board.
6. Turn on the power.
Setup
PIO-16/16L(104)10
External Connection
Connect the PIO-16/16L(104) interface board to external devices
via a 50-pin DUAL ROW BOX HEADER. The header
description is shown in the following figure.("NC" in Figure 2.7.
means this line is undefined. In the figure, "PO" means output
channel, "PI" means input channel, "00" means the number of the
channel. For example, "PO01" means output 01 channel. See
Block Diagram in Chapter 4 for more information.)
Interface Connector Pin Assignments
A1
A2
A3
A4
A5
A6
A7
A8
A9
A10
A11
A12
A13
A14
A15
A16
A17
A18
A19
A20
A21
A22
A23
A24
A25
B1
B2
B3
B4
B5
B6
B7
B8
B9
B10
B11
B12
B13
B14
B15
B16
B17
B18
B19
B20
B21
B22
B23
B24
B25
PO00
PO01
PO02
PO03
PO04
PO05
PO06
PO07
OP0
ON0
N.C.
PO10
PO11
PO12
PO13
PO14
PO15
PO16
PO17
OP1
ON1
N.C.
N.C.
N.C.
ACK
OUTPUT
GROUP2
PI00*
PI01
PI02
PI03
PI04
PI05
PI06
PI07
IP0
IN0
N.C.
PI10
PI11
PI12
PI13
PI14
PI15
PI16
PI17
IP1
N.C.
N.C.
N.C.
N.C.
STB
OUTPUT GROUP2 P-COMMON
OUTPUT GROUP2 N-COMMON
OUTPUT
GROUP3
OUTPUT GROUP3 P-COMMON
OUTPUT GROUP3 N-COMMON
INPUT
GROUP0
INPUT
GROUP1
INPUT GROUP0 AND ACK, STB P-COMMON
ACK, STB N-COMMON
INPUT GROUP1 P-COMMON
* PI00 is also used as an interrupt signal
Figure 2.7. PIO-16/16L(104) Pin Assignment
Electrical Interface
Isolated I/O : The PIO-16/16L(104) provides isolated input and
output. This board uses external power supply in addition to
drawing 5 VDC from your systems power supply. You must
make sure that sufficient power is available for proper operation.
PIO-16/16L(104) requires external 12~24 VDC supply for
powering it.
Setup
PIO-16/16L(104) 11
Input Circuit
When the relay contact is switched on, the current goes through the
photo coupler from P-COMMON to Input terminal, then the CPU
reads a data value of 1 from the input port address. Figure 2.8.
below depicts the opto-isolated input circuitry.
INPUT
~
~
P-COMMON
RELAY
CONTACT
EXTERNAL
POWER
SUPPLY
12~24V
PHOTO COUPLER
5V
EXTERNAL CIRCUITRY PIO-16/16L(104)
3k
Figure 2.8. Opto-isolated Input Circuitry
Output Circuit
The current goes through the output terminal from P-COMMON to
the transistor when the CPU writes a data value of 1 to the port
address. Figure 2.9. depicts the opto-isolated output circuitry.
OUTPUT
~
~
P-COMMON
EXTERNAL
POWER
SUPPLY
12~24V
PHOTO COUPLER
5V
N-COMMON
LOAD
PIO-16/16L(104) EXTERNAL CIRCUITRY
Figure 2.9. Opto-isolated Output Circuitry
Setup
PIO-16/16L(104)12
STB Input Circuit
Figure 2.10. below depicts the STB signal input circuitry.
STB INPUT
~
~
P-COMMON
RELAY
CONTACT
EXTERNAL
POWER
SUPPLY
12~24V
PHOTO COUPLER
5V
EXTERNAL CIRCUITRY PIO-16/16L(104)
3k
Figure 2.10. STB signal Input Circuitry
ACK Output Circuit
Figure2.11. depicts the ACK signal output circuitry.
ACK OUTPUT
~
~
P-COMMON
EXTERNAL
POWER
SUPPLY
12~24V
PHOTO COUPLER
5V
N-COMMON
LOAD
PIO-16/16L(104) EXTERNAL CIRCUITRY
Figure 2.11. ACK signal Output Circuitry
Setup
PIO-16/16L(104) 13
Opto-isolated Output Circuit Protection
You should protect the PIO-16/16L(104) output circuits from
accidental damage when driving external devices. Table 2.3. lists
four recommended methods of protection. Choose the one that
matches your external drive requirements and use the circuitry
depicted in Figure 2.12. below.
Table 2.3. Output Protection Choices
Selection
Protect from excessive coil current A
Protect from high voltage B
Protect from high voltage (limit current) C
Protect from high voltage D
External Device Protection Requirements
RESISTANCE
C
RESISTANCE
D
DIODE
A
RELAY
COIL
ZENER
DIODE
B
RELAY
COIL
Figure 2.12. Output Protection Circuits
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23
  • Page 24 24
  • Page 25 25
  • Page 26 26
  • Page 27 27
  • Page 28 28
  • Page 29 29
  • Page 30 30
  • Page 31 31
  • Page 32 32
  • Page 33 33
  • Page 34 34
  • Page 35 35
  • Page 36 36
  • Page 37 37
  • Page 38 38
  • Page 39 39
  • Page 40 40
  • Page 41 41
  • Page 42 42
  • Page 43 43

Contec PIO-16/16L(104) Owner's manual

Type
Owner's manual

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI