Real Time Devices DM5854HR User manual

DM5854HR/DM6854HR
Isolated digital I/O-module
User's Manual
Real Time Devices Finland Oy
Real Time Devices Finland Oy
Lepolantie 14
FIN-00660 Helsinki, Finland
Tel: (+358) 9 346 4538
Fax: (+358) 9 346 4539
URL: www.rtdfinland.fi
DM5854HR/DM6854HR (c) RTD Finland Oy 1996-2001

IMPORTANT
Although the information contained herein has been
carefully verified RTD Finland Oy assumes no
responsibility for any errors that may occur, for
any damage to property or persons resulting from
improper use of this manual or from the related
software. RTD Finland Oy also reserves the right to
alter the contents of this manual, as well as
features and specifications of this product at any
time, without prior notice.
Published by
Real Time Devices Finland Oy
Lepolantie 14
FIN-00660 Helsinki, Finland
Copyright © 1996-2001 by RTD Finland Oy
All rights reserved
Printed in Finland
DM5854HR/DM6854HR (c) RTD Finland Oy 1996-2001

Table of Contents
===============================================================
INTRODUCTION
General purpose digital I/O
Isolated digital inputs
Isolated digital outputs
Mechanical description
Connector description
What comes with your board
Board accessories
Application software and drivers
Hardware accessories
Using this manual
When you need help
CHAPTER 1 - BOARD SETTINGS
Factory-configured jumper settings
Base Address jumpers
Interrupts and interrupt channels
Pull-up or Pulldown jumpers
Isolated input range selection jumpers
CHAPTER 2 - BOARD INSTALLATION
Board installation
External I/O connections
Isolated Input/Output Connector
50-pin RTD Expansion Connector
CHAPTER 3 - HARDWARE DESCRIPTION
Digital I/O, 8255 Programmable digital I/O
Isolated optocoupler inputs
Isolated optocoupler outputs
Trigger output
Interrupts
DM5854HR/DM6854HR Page 1 (c) RTD Finland Oy 1996-2001

CHAPTER 4 - BOARD OPERATION AND PROGRAMMING
Defining the I/O map
Base+0 Read digital inputs / Clear interrupt
Base+1 Digital input mask
Base+2 Digital input inversion register
Base+3 Control register / Digital outputs
Base+4 PPI Port A (Read/Write)
Base+5 PPI Port B (Read/Write)
Base+6 PPI Port C (Read/Write low and high byte)
Base+7 PPI Port CW (Write)
Programming the DM6854HR
Clearing and setting bits in a port
Initializing the 8255 PPI
Isolated Digital Input programming
Isolated Digital Output programming
Trigger Output programming
Interrupts
What is an interrupt?
Interrupt request lines
8259 Programmable interrupt controller
Interrupt mask register (IMR)
End-Of-Interrupt (EOI) Command
What exactly happens when an interrupt occurs?
Using interrupts in your program
Writing an interrupt service routine (ISR)
Saving the startup IMR and interrupt vector
Common Interrupt mistakes
APPENDIX A - DM5854HR/6854HR Specifications
DM5854HR/DM6854HR Page 2 (c) RTD Finland Oy 1996-2001

List of Illustrations
===============================================================
DM5854HR/DM6854HR Page 3 (c) RTD Finland Oy 1996-2001

This user's manual describes the operation of the DM5854HR/DM6854HR Isolated
Digital Interface board.
Some of the key properties of the DM5854HR/DM685HR include:
* 8 channel-by-channel isolated digital inputs with masking modes
* 4 Optocoupled digital outputs with open collector configuration, 30V range
* 24 non isolated TTL/CMOS compatible 8255-based digital I/O lines
* Optional Pull-up or Pull-down resistors
* Software enabled interrupts XT and AT interrupts available
* Single +5V operation
* Support for direct PC/104 interface with RTD dataModules®
* XT (DM5854HR) and AT (DM6854HR) boards available
* PC/104 compliant
* RTD IDAN compatible
The following paragraphs briefly describe the major features of the DM6854HR. A more detailed
discussion is included in Chapter 3 (Hardware description) and in Chapter 4 (Board operation and
programming. The board setup is described in Chapter 1 (Board Settings).
General purpose digital I/O
The DM6854HR board has 24 8255-based TTL/CMOS compatible general purpose
digital I/O lines which can be directly interfaced with external devices or signals to interface to
alphanumerical displays, sense switch closures, trigger digital events, or activate solid-state relays.
These lines may be pulled down or pulled up or pulled down with 10K Ohm resistor networks.
Installation procedures will be described later in this manual.
Isolated digital inputs
8 Optocoupler inputs may be used to connect high voltage signals to a computer.
Eight channel-by-channel jumper configurable input ranges are available: +5V, +12V and
+24V. The optocoupler inputs have a reverse voltage protection diode across the input. This
enables AC-signals to be connected to the isolated optocoupler inputs. This input diode also
acts as a rectifier. The programmable functions of the DM6854HR enable input masking and
input pattern recognition with interrupts. This relieves the host computer from processor
capacity consuming input polling.
Isolated digital outputs
4 open collector optocoupler outputs may be used to directly drive loads such as
switches or relays with voltages up to 30V DC.
DM5854HR/DM6854HR Page 4 (c) RTD Finland Oy 1996-2001

Mechanical description
The DM6854HR is designed on a PC/104 form factor. An easy mechanical interface to
both PC/104 and EUROCARD systems can be achieved. Stack your PC/104 compatible
computer directly on the DM6854HR using the onboard mounting holes.
Connector description
There is a 50 pin digital interface connectors on the DM6854HR to directly interface to
the non-isolated 8255-based digital I/O signals. The signal definition of this connector is
compatible with the digital PC/104 dataModules manufactured by RTD.
Isolated outputs and inputs are connected to the DM6854HR by either a screw terminal
discrete wire connector of with a 50-pin flat ribbon cable header connector. Use this type of
interface connector with a TB50 screw terminal block. Please consult the factory for more
details on different connector options.
What comes with your board
You receive the following items in your DM6854HR package:
* DM5854HR or DM6854HR Isolated digital interface module
* User's manual
Note: Latest software and drivers can be downloaded from our website.
If any item is missing or damaged, please call Real Time Devices Finland Customer
service department at (+358) 9 346 4538.
Board accessories
In addition to the items included in your DM6854HR delivery several software
and hardware accessories are available. Call your distributor for more information on these
accessories and for help in choosing the best items to support your control system.
* Application software and drivers
* Hardware accessories such as IDAN aluminium enclosure systems.
For more information in IDAn please visit our websites at
www.rtdfinland.fi and www.rtdusa.com.
DM5854HR/DM6854HR Page 5 (c) RTD Finland Oy 1996-2001

Real Time Devices can supply a complete set of accessories to your DM6854HR card.
These include enclosures, power supplies, terminal boards (TB50) and other interconnection
systems.
Using this manual
This manual is intended to help you install your new DM6854HR card and get it running
quickly, while also providing enough detail about the board and it's functions so
that you can enjoy maximum use of it's features even in the most demanding applications.
When you need help
This manual and all the example programs will provide you with enough information to
fully utilize all the features on this board. If you have any problems installing or using this board,
contact our Technical Support Department (+358) 9 346 4538 during European business hours,
Email request, please include your company's name and address, your name, your telephone
number, and a brief description of the problem.
DM5854HR/DM6854HR Page 6 (c) RTD Finland Oy 1996-2001

CHAPTER 1 - BOARD SETTINGS
===============================================================
The DM6854HR Isolated digital I/O board has jumper settings you can change to
suit your application and I/O configuration setup. The board is factory configured with a
+24V input range configuration. The factory settings are listed and shown in the diagram in
the beginning of this chapter.
DM5854HR/DM6854HR Page 7 (c) RTD Finland Oy 1996-2001

Factory-Configured Jumper Settings
Table 1-1 illustrates the factory jumper setting for the DM6864HR. Figure 1-1
shows the board layout and the locations of the jumpers. The following paragraphs explain
how to change the factory jumper settings to suit your specific application.
Table 1-1 - Factory jumper settings see figure 1-1 for detailed locations
JUMPER DESCRIPTION NUMBER OF FACTORY SETTING
NAME OF JUMPER JUMPERS JUMPERS INSTALLED
BASE BASE ADDRESS 5 300h INSTALLED
IRQ INTERRUPT CHANNEL 6 5
PU/PD PU/PD FOR PPI PORTS 3-Terminal PULLDOWN
IN1-8 INPUT RANGE FOR 3 +24V RANGE
ISOLATED INPUTS 1-8
Figure 1-1 - Board layout showing jumper locations
DM5854HR/DM6854HR Page 8 (c) RTD Finland Oy 1996-2001

Base Address jumpers (Factory setting: 300h)
The most common cause of failure when you are first setting up your module is address
contention. Some of your computers I/O space is already occupied by other internal I/O
devices and expansion boards. When the DM6854HR attempts to use it's reserved I/O
addresses already used by another peripheral device erratic performance may occur and data
read from the board may be corrupted.
To avoid this problem make sure you set up the base address first using the jumpers
marked "BASE" which let you choose from 32 different I/O addresses in your computers I/O
map. Should the factory installed setting of 300H be unusable for your system configuration,
you may change this setting to another using the options illustrated in Table 1-2. The table shows
the switch settings and their corresponding values in hexadecimal values. Make sure you verify
the correct location of the base address jumpers. When you set the base address of the module,
record the setting in the table inside the back cover of this manual after the Appendices.
DM5854HR/DM6854HR Page 9 (c) RTD Finland Oy 1996-2001

Table 1-2 Base Address jumper settings
Base Address jumper settings DM6854HR
Jumper Settings
A8 A7 A6 A5 A4 Base Address
Hex / (Decimal) Jumper Settings
A8 A7 A6 A5 A4
200 / (512) 0 0 0 0 0 300 / (768) 1 0 0 0 0
210 / (528) 0 0 0 0 1 310 / (784) 1 0 0 0 1
220 / (544) 0 0 0 1 0 320 / (800) 1 0 0 1 0
230 / (560) 0 0 0 1 1 330 / (816) 1 0 0 1 1
240 / (576) 0 0 1 0 0 340 / (832) 1 0 1 0 0
250 / (592) 0 0 1 0 1 350 / (848) 1 0 1 0 1
260 / (608) 0 0 1 1 0 360 / (864) 1 0 1 1 0
270 / (624) 0 0 1 1 1 370 / (880) 1 0 1 1 1
280 / (640) 0 1 0 0 0 380 / (896) 1 1 0 0 0
290 / (656) 0 1 0 0 1 390 / (912) 1 1 0 0 1
2A0 / (672) 0 1 0 1 0 3A0 / (928) 1 1 0 1 0
2B0 / (688) 0 1 0 1 1 3B0 / (944) 1 1 0 1 1
2C0 / (704) 0 1 1 0 0 3C0 / (960) 1 1 1 0 0
2D0 / (720) 0 1 1 0 1 3D0 / (976) 1 1 1 0 1
2E0 / (736) 0 1 1 1 0 3E0 / (992) 1 1 1 1 0
2F0 / (752) 0 1 1 1 1 3F0 / (1008) 1 1 1 1 1
Fig. 1-2 Base Address jumper block (A4 to top, A8 to bottom; open <-> 0)
DM5854HR/DM6854HR Page 10 (c) RTD Finland Oy 1996-2001

Interrupt channel (Factory setting: IRQ5)
The header connector, shown on Figure 1-3, lets you connect the board interrupt to
one of the 6 interrupt channels available on the XT/AT-bus.
Fig. 1-3 Interrupt selection jumpers
The interrupt is caused by an external trigger event that has transferred the storage latch data to
the output latch of the isolated digital output stage.
DM5854HR/DM6854HR Page 11 (c) RTD Finland Oy 1996-2001

Pull-up or Pull-down resistor selection for digital I/O PA, PB, PC
(Factory setting: PA, PB and PC pulled down)
The 8255 programmable digital I/O interface provides 24 TTL/CMOS compatible lines
which can be interfaced with external devices. These lines are divided into three groups: eight
Port A lines, eight Port B lines and eight Port C lines. You can connect pull-up or pull-down
resistor networks for ports A, B and C. You may want to pull lines up for connection with
switches. This will pull the lines high if the switch is disconnected. Or you may want to pull
lines down for connection to relays which control turning motors on or off. The port A, B
and C lines of the 8255 programmable digital I/O interface are set as inputs after reset. This can
cause the external devices connected to these lines to operate erratically. Pulling these lines
down, when the board is powered up the lines will not be active before the 8255 is initialized.
Figure 1-4 shows both Ports A, B and C set in the Pull-down configuration.
Fig. 1-4 Pull-up and Pull-down jumpers for Ports A, B and C.
(Inputs pulled down when jumpers in right-hand position, see above)
PC4-PC7 Optocoupler isolated inputs (Factory setting: +24V range)
The Optocoupler inputs can be jumper configured for different input ranges. Each
channel can be set for a different range. The different ranges use different current limiting
resistors at the optocoupler diode input. Make sure you set the range correctly since
overloading the optocoupler with overcurrent may cause permanent damage to the device.
All the channels are set in a similar manner. Figure 1-5 illustrates one channel set for a
24V-level input signal. Figure 1-6 illustrates the complete input stage of the DM6854HR.
The jumper topmost toward the spring loaded connectors selects +5V input range, the
middle position +12V and the bottom most (toward the center of the board) +24V.
The optocoupler forward current is 10mA for switching (max. 16mA).
DM5854HR/DM6854HR Page 12 (c) RTD Finland Oy 1996-2001

Fig. 1-5 Optocoupler input range jumpers set for 24V input range
Fig. 1-6 Optocoupler input stage layout of the DM6854HR
DM5854HR/DM6854HR Page 13 (c) RTD Finland Oy 1996-2001

CHAPTER 2 - BOARD INSTALLATION
===============================================================
The DM6854HR Isolated digital interface board is very easy to connect to your
control system. Direct interface to PC/104 systems as well as EUROCARD boards is
provided. This chapter tells you step-by-step how to install your board into your system.
After completing the installation use the diagnostic software to fully verify that
your board is working.
DM5854HR/DM6854HR Page 14 (c) RTD Finland Oy 1996-2001

Board Installation
Keep your board in its antistatic bag until you are ready to install it to your system!
When removing it from the bag, hold the board at the edges and do not touch the components
or connectors. Please handle the board in an antistatic environment and use a grounded
workbench for testing and handling of your hardware.
Before installing the board in your computer, check the jumper settings. Chapter 1
reviews the factory settings and how to change them. If you need to change any settings,
refer to the appropriate instructions in Chapter 1. Note that incompatible jumper settings
can result in unpredictable board operation and erratic response.
General installation guidelines:
1. Turn OFF the power to your computer
2. Touch the grounded metal housing of your computer to discharge any
antistatic buildup and then remove the board from its antistatic bag.
3. Hold the board by it's edges and install it in an
enclosure or place it on the table on an antistatic surface.
4. Connect the board to the data acquisition board using
the twisted pain 50-pin flat cable. Make sure that the polarity of
the cable is correct.
Installation integrated with a PC/104 module stack:
* Secure the four PC/104 installation holes with standoffs.
* Connect the 50-pin expansion connector to your nonisolated digital signals
and directly connect your isolated input and output control devices to the
onboard I/Oconnectors.
DM5854HR/DM6854HR Page 15 (c) RTD Finland Oy 1996-2001

Fig. 2-1 DM5854HR integrated with a PC/104 dataModule® stack.
DM5854HR/DM6854HR Page 16 (c) RTD Finland Oy 1996-2001

3U rack or enclosure installation with a EUROCARD CPU with one DM5854HR.
* The PC/104 system can easily be inserted into a 19" rack installation using the CPU as
a "form factor adapter". Assemble your PC/104 dataModules® on a RTD single board
EUROCARD computer and install the system in a 19" enclosure. Multiple DM5854HR
boards can easily be connected to this system. See figure 2-2.
Fig. 2-2 19" Eurocard rack installation with an integrated PC/104 dataModule
and EUROCARD cpuModule computer system.
DM5854HR/DM6854HR Page 17 (c) RTD Finland Oy 1996-2001

External I/O connections
Figure 2-3 shows the interface connector layout of the DM6854HR. This connector
is located toward the top of the board. Refer to this diagram when making isolated signal
output connections. Figure 2-4 shows the standard I/O connector pinout.
Figure 2-3a shows the screw terminal discrete wire connector pinout and figure 2-3b
shows the pinout of the same connector using a header connector.
Pin 1 is to the left side of the connector. ALL SIGNALS ARE ISOLATED
1. IN1+
2. IN1-
3. IN2+
4. IN2-
5. IN3+
6. IN3-
7. IN4+
8. IN4-
9. IN5+
10. IN5-
11. IN6+
12. IN6-
13. IN7+
14. IN7-
15. IN8+
16. IN8-
17. OUT1_COLLECTOR
18. OUT1_EMITTER
19. OUT2_COLLECTOR
20. OUT2_EMITTER
21. OUT3_COLLECTOR
22. OUT3_EMITTER
23. OUT4_COLLECTOR
24. OUT4_EMITTER
Fig. 2-3a Isolated Input/Output interface using screw terminal block connector
DM5854HR/DM6854HR Page 18 (c) RTD Finland Oy 1996-2001
This manual suits for next models
1
Table of contents
Other Real Time Devices I/O System manuals