PC104-DI48
User’s Manual

Revision 3A
September, 2000

Trademark and Copyright Information
Measurement Computing Corporation, InstaCal, Universal Library, and the Measurement Computing logo areeither trademarks or registered trademarks of Measurement Computing Corporation. Refer to the Copyrights &Trademarks section on mccdaq.com/legal for more information about Measurement Computing trademarks.
Other product and company names mentioned herein are trademarks or trade names of their respective
companies.
© 2000 Measurement Computing Corporation. All rights reserved. No part of this publication may be
reproduced, stored in a retrieval system, or transmitted, in any form by any means, electronic, mechanical, by
photocopying, recording, or otherwise without the prior written permission of Measurement Computing
Corporation.
NoticeMeasurement Computing Corporation does not authorize any Measurement Computing Corporation product for
use in life support systems and/or devices without prior written consent from Measurement Computing
Corporation. Life support devices/systems are devices or systems that, a) are intended for surgical implantation
into the body, or b) support or sustain life and whose failure to perform can be reasonably expected to result ininjury. Measurement Computing Corporation products are not designed with the components required, and are
not subject to the testing required to ensure a level of reliability suitable for the treatment and diagnosis ofpeople.

HM PC104-DI48.lwp

Table of Contents
1.0 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2.0 SOFTWARE INSTALLATION . . . . . . . . . . . . . . . . . . . . . . . . 1
3.0 HARDWARE INSTALLATION . . . . . . . . . . . . . . . . . . . . . . . 23.1 BOARD SETUP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23.2 BASE ADDRESS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24.0 CABLING . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44.1 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44.2 CONNECTOR DIAGRAM . . . . . . . . . . . . . . . . . . . . . . . . . . 45.0 DATA REGISTERS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66.0 SPECIFICATIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77.0 ELECTRONICS AND INTERFACING . . . . . . . . . . . . . . . . . 87.1 UNCONNECTED INPUTS FLOAT . . . . . . . . . . . . . . . . . . . . 8
7.2 TTL TO SOLID STATE RELAYS . . . . . . . . . . . . . . . . . . . . . . 9
7.3 VOLTAGE DIVIDERS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
7.4 LOW PASS FILTERS DE-BOUNCE INPUTS . . . . . . . . . . . 10

This page is blank.

1.0 INTRODUCTION
The PC104-DI48 is designed to have the best quality and lowest cost of any digital
input board.
The PC104-DI48 conforms to the connector pin specification of all the PC104-DIO48
digital boards and CIO-Dxx48, 96 and 192 family digital boards, so may be used inplace of one another without changing cabling or connectors.
These products are supported by Universal Library programming library.

2.0 SOFTWARE INSTALLATIONThe board has a variety of switches and jumpers to set before installing the board inyour computer. By far the simplest way to configure your board is to use theInstaCalTM program provided as part of your software package. InstaCalTM will showyou all available options, how to configure the various switches and jumpers (asapplicable) to match your application requirements, and will create a configuration
file that your application software (and the Universal Library) will refer to so thesoftware you use will automatically know the exact configuration of the board.
Please refer to the Extended Software Installation Manual regarding the installationand operation of InstaCalTM. The following hard copy information is provided as amatter of completeness, and will allow you to set the hardware configuration of theboard if you do not have immediate access to InstaCalTM and/or your computer.
Details for setting of the switches are in the following section.

1

3.0 HARDWARE INSTALLATION

3.1 BOARD SETUP
The PC104-DI48 is setup at the factory with BASE ADDRESS= 300h (768 decimal).
Open your PC (after turning off the power) and install the board. Leave the address
switches as they were set at the factory or refer to the information below to change thesettings. After the board is installed and the computer is closed up, turn power on.
PC104-DI48 is a dedicated 48 line digital input board built up of logic chips. There
are no control registers. The input pins present a single LSTTL load.

3.2 BASE ADDRESSThe PC104-DI48 employs the PC bus for power, communications and data transfer.
As such, it draws power from the PC, monitors the address lines and control signals
and responds to it's I/O address. It receives and places data on eight data lines.
Base address is the most important user-selectable item of the PC104-DI48. The baseaddress is the starting location that software reads from when communicating with thePC104-DI48. DIP switches (Figures 3-1 and 4-2) are used to set the base address (0).
Each switch position corresponds to one of the PC bus address lines. By placing theswitch down, the address decode logic adds that value to the base address.
A base address is constructed bycalculating the HEX or decimal
number which will be the address
the board will respond to. For
example, in Figure 3-1, switches 1and 2 are down, all others are up.

1 2 3 4 5 6 7Switch 1 = 200h (512d) and switch
2 = 100h (256d). Added together
they equal 300h (768 decimal).

SW1234567HEX
200
1008040201008

Figure 3-1. Base Address Switches (300h Shown)
Certain addresses are used by the PC, others are free and may be used by thePC104-DI48 and other expansion boards. We recommend that BASE = 300h (768D)
be tried first. Refer to Table 3-1 below for PC I/O addresses.
2

HEX
RANGE
000-00F
020-021040-043060-063060-064070-071080-08F
0A0-0A1
0A0-0AF
0C0-0DF
0F0-0FF
1F0-1FF
200-20F
210-21F
238-23B
23C-23F
270-27F
2B0-2BF

Table 3-1. I/O AddressesFUNCTIONHEXRANGE
8237 DMA #1
2C0-2CF8259 PIC #1
2D0-2DF
8253 TIMER
2E0-2E78255 PPI (XT)
2E8-2EF
8742 CONTROLLER (AT)
2F8-2FFCMOS RAM & NMI MASK (AT)
300-30FDMA PAGE REGISTERS
310-31F
8259 PIC #2 (AT)320-32FNMI MASK (XT)378-37F
8237 #2 (AT)380-38F
80287 NUMERIC CO-P (AT)3A0-3AF
HARD DISK (AT)
3B0-3BBGAME CONTROL
3BC-3BF
EXPANSION UNIT (XT)
3C0-3CFBUS MOUSE
3D0-3DFALT BUS MOUSE
3E8-3EFPARALLEL PRINTER
3F0-3F7EGA3F8-3FF

FUNCTION
EGA
EGA
GPIB (AT)SERIAL PORTSERIAL PORTPROTOTYPE CARD
PROTOTTYPE CARD
HARD DISK (XT)
PARALLEL PRINTER
SDLC
SDLC
MDA
PARALLEL PRINTEREGACGASERIAL PORTFLOPPY DISKSERIAL PORTThe PC104-DI48 BASE switch may be set for address in the range of 000-3FC so it
should not be hard to find a free address area for you PC104-DI48. If you are notusing IBM prototyping cards or some other board which occupies these addresses,
then 300-31F HEX are free to use.
Addresses not specifically listed, such as 390-39F, are not reserved and may beavailable. Check your computer for other boards which may use I/O addresses.

34.0 CABLING

4.1 INTRODUCTION
The PC104-DI48 connector is a standard 50 pin header connector (Figure 4-2). A
cable with mating connectors (C50FF-#) can be purchased from Measurement
Computing Corporation.

4.2 CONNECTOR DIAGRAM
The PC104-DI48 connector is a 50-pin header-type connector.

+5V
PC1 BIT 1
PC1 BIT 3
PC1 BIT 5
PC1 BIT 7
PB1 BIT 1
PB1 BIT 3
PB1 BIT 5
PB1 BIT 7
PA1 BIT 1
PA1 BIT 3PA1 BIT 5PA1 BIT 7PC2 BIT 1PC2 BIT 3PC2 BIT 5PC2 BIT 7PB2 BIT 1PB2 BIT 3PB2 BIT 5PB2 BIT 7PA2 BIT 1PA2 BIT 3PA2 BIT 5PA2 BIT 7GND
PC1 BIT 0
PC1 BIT 2PC1 BIT 4PC1 BIT 6PB1 BIT 0PB1 BIT 2PB1 BIT 4PB1 BIT 6
PA1 BIT 0
PA1 BIT 2
PA1 BIT 4
PA1 BIT 6PC2 BIT 0PC2 BIT 2PC2 BIT 4PC2 BIT 6PB2 BIT 0
PB2 BIT 2PB2 BIT 4PB2 BIT 6
PA2 BIT 0
PA2 BIT 2PA2 BIT 4
PA2 BIT 6Figure 4-1. 50-Pin Connector

4PORT 1
BASE + 0, 1, 2

PORT 2
BASE + 4, 5, 6

Figure 4-2. Base Address Switches and Pin 1 Locations

55.0 DATA REGISTERS
Each PC104-DI48 is composed of parallel input chips. Each address has one input
buffer that senses eight input pins. The ports are arranged in sets of three, with anintervening N/A (not used) address area. This scheme allows compatibility with
software written to control 82C55 based boards when the 82C55 is used as all inputs.
(On those boards every fourth address contains a control register.)
The first address, or BASE ADDRESS, is determined by setting the base address
switches on the board. To read data from an input register, a byte is read representing
the status of all eight digital input lines. The individual bits are decoded as a (0) or a(1). Data read from registers must be analyzed to determine which bits are on or off.
The registers and their function are listed on the following table. Each register haseight bits of data.
ADDRESS
BASE + 0
BASE + 1
BASE + 2
BASE + 3
BASE + 4
BASE + 5
BASE + 6BASE + 7READ FUNCTIONPort 1A Data
Port 1B Data
Port 1C Data
None
Port 2A Data
Port 2B Data
Port 2C Data
None

WRITE FUNCTION
None
None
None
None
None
None

PORTS 1A and 2A DATABASE ADDRESS + 0, and +4765A7A6A54A43A32A21A10A0PORTS 1B and 2B DATABASE ADDRESS + 1, and +5765B7B6B54B43B32B21B10B0PORTS 1C and 2C DATABASE ADDRESS + 2, and +6765C7C6C54C43C32C21C10C066.0 SPECIFICATIONSPOWER CONSUMPTION+5V Supply+12V Supply−12V Supply
DIGITAL INPUT
Digital TypeConfiguration
Number of channels
Input High
Input Low
Miscellaneous

ENVIRONMENTAL
Operating Temperature
Storage Temperature
Humidity

250 mA typical / 325 mA max.
None.
None.

Input: 74LS373
6 banks of 8 bits each, input only
48 inputs
2.0 volts min, 7 volts absolute max
0.8 volts max, −0.5 volts absolute min
Locations provided for installation of pull-up orpull-down resistors.

0 to 70°C−40 to 100°C
0 to 90% non-condensing

77.0 ELECTRONICS AND INTERFACING
This short introduction to the electronics, most often needed by digital I/O boardusers, covers a few key concepts.

7.1 UNCONNECTED INPUTS FLOAT
Unconnected inputs will float. If you are using the PC104-DI48 board for input, andhave unconnected inputs, ignore the data from those lines.
For example, if you connect bit A0 and not bit A1, do not be surprised if A1 stays
low, stays high or tracks A0... It is unconnected and so is unspecified. The input
buffer is not malfunctioning. In the absence of a pull-up/pull-down resistor, any input
to a PC104-DI48 which is unconnected, is unspecified.
You do not have to tie input lines, and unconnected lines will not affect theperformance of connected lines. Just make sure that you mask out any unconnected
bits in software.
An alternative to masking inputs is to define the state of unused inputs by using
pull-up or pull-down resistors. There are locations on the board for installation ofthese resistors marked RN1 through RN6. The location associated with FIRST PORTA (the port at Base +0) is RN1. The location for FIRST PORT B (the port at Base+1) is RN2. FIRST PORT C (Base +2) is RN3; SECOND PORT A (Base +4) isRN4; SECOND PORT B (Base +5) is RN5; SECOND PORT C (Base +6) is RN6.
A 10Kohm, eight-resistor SIP has all its resistors connected on one end to a single
common pin. The common pin is marked with a dot and is at one end of the SIP. The
other ends connect to eight in-line pins.
The SIP can be installed to pull-up or pull-down. At each location there are 10 holes
in a line. One end of the line is marked HI; the other end LO. The eight holes in themiddle are connected to the eight lines of a port, A, B, or C.
To pull-up lines, orient the SIP with the common pin (dot) in toward the HI end; topull-down, install the resistor with the common pin in the LO hole.
Carefully solder the SIP in place.
A resistor value of 10K is recommended. Use other values only if you havedetermined the necessity for doing so.

8

7.2 TTL TO SOLID STATE RELAYS
Many applications require digital inputs monitor AC and DC voltages. High AC andDC voltages cannot be applied directly by the TTL digital lines.
Solid State Relays, such as those available from Measurement Computing Corp. allow
control and monitoring of high AC and DC voltages and provide 400V isolation.
Solid State Relays (SSRs) are recommended for interfacing to high voltages.
The most convenient way to use solid state relays is to purchase a Solid State Relay
Rack. SSR Racks are available from Measurement Computing Corp.

7.3 VOLTAGE DIVIDERS
An alternative method of measuring a signal which varies over a range greater than theinput range of a digital input, is to use a voltage divider. When correctly designed, it
can drop the voltage of the input signal to a safe level the digital input can accept.
Ohm's law states:
Voltage = Current x Resistance
Kirkoff's law states:
The sum of the voltage drops around a circuit will be equal to the voltage
drop for the entire circuit.
In a voltage divider, the voltage across one resistor in a series circuit is proportional to
the total resistance divided by the one resistor (see formula below).
The object in a voltage divider is to choose two resistors having the proportions ofthe maximum voltage of the input signal to the maximum allowed input voltage.
The formula for attenuation is:Attenuation = R1 + R2
R2
2 = 10K + 10K
10K

R1 = (A-1) x R2

For example, if the signal varies between 0 and 20
volts and you wish to measure that with an analog
input with a full scale range of 0 to 10 volts, theattenuation (A) is 2:1 or just 2.
For a given attenuation, pick a resistor and call it
R2, the use this formula to calculate R1.
9Digital inputs often require the use of voltage dividers. For example, if you wish tomeasure a digital signal that is at 0 volts when off and 24 volts when on, you cannot
connect that directly to a digital input. The voltage must be dropped to 5 volts max
when on. The attenuation is 24:5 or 4.8.
Using the equation above, if R2 is 1K, R1 = (4.8−1) x 1000 = 3.8K.
Remember that a TTL input is 'on' when the input voltage is greater than 2.5 volts.
NOTEThe resistors, R1 and R2, are going to dissipate power in the divider
circuit according to the equation W = I2 x R; (Current (I) =Voltage/Resistance). The higher the value of the resistance (R1 +R2), the less power dissipated by the divider circuit. Here is asimple rule:
For attenuation of <5:1, no resistor should be less than 10K.
For attenuation of > 5:1, no resistor should be less than 1K.

7.4 LOW PASS FILTERS DE-BOUNCE INPUTS
A low pass filter is placed on the signal wires between a signal and an A/D board. It
prevents frequencies greater than the cut-off frequency from entering the A/D board's
digital inputs.
The cut-off frequency is that frequency above which no variation of voltage withrespect to time may enter the circuit. For example, if a low-pass filter had a cut-off
frequency of 30 Hz, the kind of interference associated with line voltage (60 Hz)
would be mostly filtered out but a signal of 25 Hz would pass with less attenuation.
Also, in a digital circuit, a low-pass filter is often used to remove contact bounce noise
signals from a switch or a relay contacts.
A simple low-pass filter can be constructed from one resistor (R) and one capacitor(C). The cut-off frequency is determined according to the formula:
Fc =

12πRC

R=

12π C Fc

Where π = 3.14...
R = ohms
C = farads
Fc = cut-off frequency in cycles/second.

10

EC Declaration of Conformity
We, Measurement Computing Corp., declare under sole responsibility that the product:
Part Number
PC104-DI48

Description
Digital input board

to which this declaration relates, meets the essential requirements, is in conformity
with, and CE marking has been applied according to the relevant EC Directives listed
below using the relevant section of the following EC standards and other normative
documents:
EU EMC Directive 89/336/EEC: Essential requirements relating to electromagneticcompatibility.
EU 55022 Class B: Limits and methods of measurements of radio interference
characteristics of information technology equipment.
EN 50082-1: EC generic immunity requirements.
IEC 801-2: Electrostatic discharge requirements for industrial process measurement
and control equipment.
IEC 801-3: Radiated electromagnetic field requirements for industrial process
measurements and control equipment.
IEC 801-4: Electrically fast transients for industrial process measurement and control
equipment.

Carl Haapaoja, Director of Quality Assurance

Measurement Computing Corporation
10 Commerce Way
Suite 1008
Norton, Massachusetts 02766(508) 946-5100
Fax: (508) 946-9500
E-mail: info@mccdaq.com
www.mccdaq.com