Notice
The information in this document is provided for reference only. ACCES does not assume any liability arising out of 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 ACCES, nor the rights of others.
IBM PC, PC/XT, and PC/AT are registered trademarks of the International Business Machines Corporation.
Printed in USA. Copyright 2000, 2005 by ACCES I/O Products Inc, 10623 Roselle Street, San Diego, CA 92121. All rights reserved.
WARNING!!
ALWAYS CONNECT AND DISCONNECT YOUR FIELD CABLING WITH THE COMPUTER POWER OFF. ALWAYS TURN COMPUTER POWER OFF BEFORE INSTALLING A CARD. CONNECTING AND DISCONNECTING CABLES, OR INSTALLING CARDS INTO A SYSTEM WITH THE COMPUTER OR FIELD POWER ON MAY CAUSE DAMAGE TO THE I/O CARD AND WILL VOID ALL WARRANTIES, IMPLIED OR EXPRESSED.
Warranty
Prior to shipment, ACCES equipment is thoroughly inspected and tested to applicable specifications. However, should equipment failure occur, ACCES assures its customers that prompt service and support will be available. All equipment originally manufactured by ACCES which is found to be defective will be repaired or replaced subject to the following considerations.
Terms and Conditions
If a unit is suspected of failure, contact ACCES' Customer Service department. Be prepared to give the unit model number, serial number, and a description of the failure symptom(s). ACCES may suggest simple tests to confirm the failure. An RMA (Return Material Authorization) number will be assigned, which must appear on the outer label of the return package. All units/components should be properly packed for handling and returned with freight prepaid to the ACCES designated Service Center, and will be returned to the customer's/user's site freight prepaid and invoiced.
Coverage
First Three Years: Returned unit/part will be repaired and/or replaced at ACCES' option with no charge for labor or parts not excluded by warranty. Warranty commences with equipment shipment.
Following Years: Throughout your equipment's lifetime, ACCES stands ready to provide on-site or in-plant service at reasonable rates similar to those of other manufacturers in the industry.
Equipment Not Manufactured by ACCES
Equipment provided but not manufactured by ACCES is warranted and will be repaired according to the terms and conditions of the respective equipment manufacturer's warranty.
General
Under this Warranty, liability of ACCES is limited to replacing, repairing or issuing credit (at ACCES discretion) for any products which are proved to be defective during the warranty period. In no case is ACCES liable for consequential or special damage arising from use or misuse of its product. The customer is responsible for all charges caused by modifications or additions to ACCES equipment not approved in writing by ACCES or, if in ACCES opinion the equipment has been subjected to abnormal use. "Abnormal use" for purposes of this warranty is defined as any use to which the equipment is exposed other than that use specified or intended as evidenced by purchase or sales representation. Other than the above, no other warranty, expressed or implied, shall apply to any and all such equipment furnished or sold by ACCES.
Chapter 1: Introduction
This Serial Interface Card was designed for effective multipoint transmission in RS485 (EIA485) protocol. The card is 6.0 inches long and may be installed in 5-volt PCI-bus slots of IBM PC or compatible computers. The card features four independent, asynchronous RS485 serial ports, type 16550 buffered UARTS, and, for Windows compatibility, automatic control to transparently enable/disable the transmission drivers.
There are two I/O connector options. The standard model includes two 9-pin male connectors on the card mounting bracket plus a second mounting bracket with two more 9-pin male connectors with ribbon cables to connect them to headers on the card. Model S1 includes a single 25-pin connector on the mounting bracket plus a "spider" or breakout cable that terminates in four 9-pin D-type connectors.
RS485 Balanced Mode Operation
The card supports RS485 communications and uses differential balanced drivers for long range and noise immunity. RS485 operation involves switchable transceivers and the ability to support multiple devices on a single "party line". The RS485 specification defines a maximum of 32 devices on a single line. The number of devices served on a single line can be expanded by use of "repeaters".
RS485 communications requires that one transmitter supply a bias voltage to ensure a known "zero" state when all transmitters are off. Also, receiver inputs at each end of the network should be terminated to eliminate "ringing". The card supports biasing by default and supports termination by jumpers on the card. If your application requires the transmitter to be un-biased, please contact the factory.
COM Port Compatibility
Type 16550 UARTs are used as the Asynchronous Communication Element (ACE). These have a 16-byte transmit/receive buffer to protect against lost data in multitasking operating systems, while maintaining 100 percent compatibility with the original IBM serial port. The system assigns the address(es).
A crystal oscillator is located on the card. This oscillator ensures precise selection of baud rate up to 115,200 or, by changing a jumper, up to 460,800.
The driver/receiver used, the SN75176B, is capable of driving extremely long communication lines at high baud rates. It can drive up to +60 mA on balanced lines and receive inputs as low as 200 mV differential signal superimposed on common mode noise of +12 V or -7 V. In case of communication conflict, the driver/receivers feature thermal shutdown.
Communication Mode
This card supports Half-Duplex communications with a 2-wire cable connection. Half-Duplex allows traffic to travel in both directions, but only one way at a time. RS485 communications commonly use the Half-Duplex mode since they share only a single pair of wires.
Baud Rate Ranges
The card has capability for two baud rate ranges and you can select which you wish to use on a port-by-port basis. One range is up to 115,200 baud applications and the other is up to 460,800 baud.
Auto-RTS Transceiver Control
In RS485 communications, the driver must be enabled and disabled as needed, allowing all cards to share a two wire cable. The card controls the driver automatically. With automatic control, the driver is enabled when data is ready to be transmitted. The driver remains enabled for one additional character's transmission time after data transfer is complete and then is disabled. The receiver is also normally enabled, then disabled during RS485 transmissions, and then re-enabled after transmission is completed (plus one character transmission time). The card automatically adjusts its timing to the baud rate of the data. This automatic control feature makes the card ideal for use in WIN95/98/NT applications.
Specifications
Communications Interface
- I/O Connection: 9-pin D-sub connectors.
- Serial Ports: Four shielded male D-sub 9-pin IBM AT style connectors compatible with RS485 specifications. (Note: On model S01, an external "spider" or breakout cable terminates with four female D-sub 9-pin connectors.)
- Character length: 5, 6, 7, or 8 bits.
- Parity: Even, odd or none.
- Stop Interval: 1, 1.5, or 2 bits.
- Serial Data Rates: Up to 115,200 baud, Asynchronous. A faster range of rates, up to 460,800, is achieved by jumper selection on the card. Type 16550 buffered UART.
- Address: Continuously mappable within 0000 to FFFF (hex) range of PCI bus addresses (Conforms to PCI Specification 2.1).
- Receiver Input Sensitivity: +200 mV, differential input.
- Common Mode Rejection: +12V to -7V.
- Transmitter Output Drive Capability: 60 mA, with thermal shutdown.
Environmental
- Operating Temperature Range: 0 °C to +60 °C.
- Storage temperature Range: -50 °C to +120 °C.
- Humidity: 5% to 95%, non-condensing.
- Power Required: +5VDC at 125 mA typical, -12VDC at 5 mA typical, +12VDC at 5 mA typical, 750 mW total power consumption.
- Size: 7.8" long (198 mm) by 3.9" (99 mm).
Diagrams
Figure 1-1: Block Diagram (Only one serial channel shown)
A block diagram illustrating a single serial channel on the PCI-COM485/4 card. It shows the data path from the Computer PCI Bus through a PCI Interface Chip, an Oscillator, and a UART (16550 or similar). This connects to Auto RTS Circuitry, which controls a Transceiver. The Transceiver has differential outputs (Tx/Rx+ and Tx/Rx-) leading to a DB9 connector.
Chapter 2: Installation
A printed Quick-Start Guide (QSG) is provided with the card for convenience. This chapter may be redundant if the QSG steps have already been followed.
The software provided with this card is on CD and must be installed onto your hard disk prior to use. Follow the steps below appropriate for your operating system.
Configure Card Options via Jumper Selection
Before installing the card into your computer, carefully read Chapter 3: Option Selection of this manual. Configure the card according to your requirements and protocol (RS-232, RS-422, RS-485, 4-wire 485, etc.). The Windows-based setup program can assist in configuring jumpers and provide descriptions for card options like termination, bias, baud rate range, and communication protocols.
CD Software Installation
The following instructions assume the CD-ROM drive is drive "D". Substitute the appropriate drive letter for your system as necessary.
DOS Installation
- Place the CD into your CD-ROM drive.
- Type
D:
[Enter] to change the active drive to the CD-ROM drive. - Type
INSTALL
[Enter] to run the install program. - Follow the on-screen prompts to install the software for this board.
Windows Installation
- Place the CD into your CD-ROM drive.
- The system should automatically run the install program. If it does not run promptly, click START | RUN, type
INSTALL
, click OK or press [Enter]. - Follow the on-screen prompts to install the software for this board.
Linux Installation
Please refer to linux.htm
on the CD-ROM for information on installing under Linux.
Note: COM boards can be installed in virtually any operating system. ACCES supports installation in earlier versions of Windows and anticipates support for future versions.
Hardware Installation
- Set switches and jumpers according to the Option Selection section of this manual or the suggestions in SETUP.EXE.
- Do not install the card into the computer until the software has been fully installed.
- Turn OFF computer power AND unplug AC power from the system.
- Remove the computer cover.
- Carefully install the card in an available 5V or 3.3V PCI expansion slot (you may need to remove a backplate first).
- Inspect for proper fit of the card and tighten screws. Ensure the card mounting bracket is properly screwed into place and has a positive chassis ground.
- Install an I/O cable onto the card's bracket mounted connector.
- Replace the computer cover and turn ON the computer. Enter the CMOS setup program and verify that the PCI plug-and-play option is set appropriately for your system. For PNP-compliant operating systems (Windows 95/98/2000/XP/2003), set the CMOS option to OS. For non-PNP-compliant systems (DOS, Windows NT, Windows 3.1), set the PNP CMOS option to BIOS or Motherboard. Save the option and continue booting.
- Most computers should auto-detect the card and automatically finish installing the drivers, depending on the operating system.
- Run
PCIFind.exe
to complete installing the card into the registry (for Windows only) and to determine the assigned resources. - Run one of the provided sample programs (copied to the newly created card directory from the CD) to test and validate your installation.
ESD Caution
Caution! ESD: A single static discharge can damage your card and cause premature failure! Please follow all reasonable precautions to prevent a static discharge, such as grounding yourself by touching any grounded surface prior to touching the card.
Chapter 3: Option Selection
Refer to the Option Selection Map at the end of this section to locate the jumpers described. Operation of the serial communications section is determined by jumper installation.
Terminations
A transmission line should be terminated at the receiving end in its characteristic impedance. Installing a jumper at the locations labeled LDxO applies a 120Ω load across the transmit/receive input/output for RS485 operation.
Figure 3-1: Simplified Termination Schematic
This schematic shows a termination resistor (120Ω, labeled LDxO) placed across the Tx+/Rx+ and Tx-/Rx- lines of a transmission line to prevent signal reflections and ringing.
In RS485 operations with multiple terminals, only the RS485 ports at each end of the network should have terminating impedance. To terminate the COM A port, place a jumper at LDAO. To terminate COM B, COM C, and COM D ports, place jumpers at LDBO, LDCO, and LDDO respectively.
For RS485 operation, there must be a bias on the RX+ and RX- lines. If the card is not to provide this bias, contact the factory technical support.
Data Cable Wiring
Signal | Pin Connection |
---|---|
TX+ and RX+ | 2 |
TX- and RX- | 3 |
Ground | 5 |
Baud Rate Ranges
The jumpers labeled CLK X1 and CLK X4 select the baud rates in either of two ranges. When in the "X1" position, the baud rate range is up to 115,200 baud. When in the CLK X4 position, the baud rate range is up to 460,800 baud.
Note: Refer to Table 5-1, Baud Rate Divisors on page 15 of this manual.
Interrupts (Windows NT)
In Windows NT, changes may be required in the system registry to support IRQ sharing. The following information is excerpted from Microsoft's documentation on controlling multiport serial I/O cards.
The Microsoft serial driver can control many multiport serial cards. Each port of a multiport card has a separate subkey under HKLM\CurrentControlSet\Services\Serial in the registry. Values for DosDevices, Interrupt, InterruptStatus, PortAddress, and PortIndex must be added to these subkeys, as they are not detected by the Hardware Recognizer.
Example registry settings for a four-port card configured with address 0xFFF0 and interrupt 05:
Serial2 Subkey:
- PortAddress = REG_DWORD 0xFFF0
- Interrupt = REG_WORD 5
- DosDevices = REG_SZ COM3
- InterruptStatus = REG_DWORD 0xFFF8
- PortIndex = REG_DWORD 1
Serial3 Subkey:
- PortAddress = REG_DWORD 0xFFE0
- Interrupt = REG_DWORD 5
- DosDevices = REG_SZ COM4
- InterruptStatus = REG_DWORD 0xFFF8
- PortIndex = REG_DWORD 2
Serial4 Subkey:
- PortAddress = REG_DWORD 0xFF90
- Interrupt = REG_DWORD 5
- DosDevices = REG_SZ COM5
- InterruptStatus = REG_DWORD 0xFFF8
- PortIndex = REG_DWORD 3
Serial5 Subkey:
- PortAddress = REG_DWORD 0xFF80
- Interrupt = REG_DWORD 5
- Dos Devices = REG_SZ COM6
- InterruptStatus = REG_DWORD 0xFFF8
- PortIndex = REG_DWORD 4
The Interrupt Status Register, indicating which port caused an IRQ, is located at COM A Base Address +8.
Diagrams
Figure 3-2: Option Selection Map
This diagram shows the physical layout of the PCI card, indicating the locations of COM A, COM C, COM D, and COM B connectors. It also highlights jumper blocks for termination (LDAO, LDBO, LDCO, LDDO) and baud rate selection (CLKX1, CLKX4). The card dimensions are shown as 6.1" in length and 3.9" in width.
Chapter 4: Address Selection
The card utilizes four separate address spaces: COM A occupies 16 consecutive register locations, and COM B, COM C, and COM D each occupy eight consecutive register locations.
PCI architecture is Plug-and-Play, meaning the BIOS or Operating System determines the resources assigned to PCI cards, rather than manual selection via switches or jumpers. Consequently, the card's base address cannot be set or changed; it can only be determined by the system.
To find the assigned base address, run the provided PCIFind.EXE utility. This utility lists all detected cards on the PCI bus, their assigned addresses, and respective IRQs.
Alternatively, some operating systems (Windows 95/98/2000) allow querying for assigned resources. Use PCIFind (DOS), PCINT (Windows95/98/NT), or the Device Manager utility from System Properties. The card is listed under the Data Acquisition class. Selecting the card, clicking Properties, and then the Resources Tab displays allocated resources.
PCIFind uses the Vendor ID and Device ID to locate your card and read its base address and IRQ.
To determine the base address and IRQ manually:
- The Vendor ID for the card is 494F (ASCII for "IO").
- The Device ID for the card is 1059h.
Chapter 5: Programming
Sample Programs
Sample programs are provided with the card in C, Pascal, QuickBASIC, and various Windows languages. DOS samples are in the DOS directory, and Windows samples are in the WIN32 directory.
Windows Programming
The card installs as COM ports in Windows, allowing the use of standard Windows API functions, including:
CreateFile()
andCloseHandle()
for opening and closing a port.SetupComm()
,SetCommTimeouts()
,GetCommState()
, andSetCommState()
to configure port settings.ReadFile()
andWriteFile()
for port access.
Consult the documentation for your chosen language for details. DOS programming differs significantly.
Initialization
Initializing the chip requires knowledge of the UART's register set. The first step is setting the baud rate divisor. This is done by setting the DLAB (Divisor Latch Access Bit) high (Bit 7 at Base Address +3). In C code:
outportb(BASEADDR +3, 0x80);
Then, load the divisor into Base Address +0 (low byte) and Base Address +1 (high byte). The relationship is:
desired baud rate = (UART Clock Frequency) / (32 * divisor)
The UART clock frequency on the card is 1.8432 MHz. The following table lists popular divisor frequencies based on the BAUD jumper position (X1 or X4).
Table 5-1: Baud Rate Divisors
Baud Rate | Divisor x1 | Divisor x4 | Max Diff. Cable Length* |
---|---|---|---|
460800 | 1 | 1 | 550 ft |
230400 | 2 | 2 | 1400 ft |
153600 | 3 | 3 | 2500 ft |
115200 | 4 | 4 | 3000 ft |
57600 | 6 | 8 | 4000 ft |
38400 | 8 | 12 | 4000 ft |
28800 | 12 | 16 | 4000 ft |
19200 | 16 | 24 | 4000 ft |
14400 | 24 | 32 | 4000 ft |
9600 | 32 | 48 - Most Common | 4000 ft |
4800 | 48 | 96 | 4000 ft |
2400 | 96 | 192 | 4000 ft |
1200 | 192 | 384 | 4000 ft |
* Recommended maximum distances for differentially driven data cables (RS422 or RS485) are for typical conditions. |
Example C code to set the chip to 9600 baud:
outportb(BASEADDR, 0x0C);
outportb(BASEADDR +1, 0);
The second step is to set the Line Control Register at Base Address +3. This register defines word length, stop bits, and parity. Bits 0 and 1 control word length (5 to 8 bits).
Bit 2 determines the number of stop bits (0 for one, 1 for two). Bits 3 through 6 control parity and break enable (typically set to zeroes). Bit 7 is the DLAB, which must be zero after the divisor is loaded.
The C command to set the UART for an 8-bit word, no parity, and one stop bit is:
outportb(BASEADDR +3, 0x03)
Finally, flush the receiver buffers with two reads from Base Address +0. The UART is now ready.
Reception
Reception can be handled via polling or interrupt-driven methods.
Polling Reception:
Continuously read the Line Status Register at Base Address +5. Bit 0 indicates when data is ready. A polling loop checks this bit and reads data as it becomes available. The following code fragment implements a polling loop, using ASCII Carriage Return (13) as an end-of-transmission marker:
do {
while (!(inportb(BASEADDR +5) & 1)); /*Wait until data ready*/
data[i++]= inportb(BASEADDR); /*Reads the line until null character rec'd*/
} while (data[i]!=13);
Interrupt-Driven Reception:
This method is preferred for high data rates. The handler reads the Interrupt Identification Register at Base Address +2. If the interrupt is for Received Data Available, the handler reads the data. A sample C handler:
readback = inportb(BASEADDR +2);
if (readback & 4) {
/*Readback will be set to 4 if data are available*/
data[i++]=inportb(BASEADDR);
outportb(0x20,0x20); /*Write EOI to 8259 Interrupt Controller*/
return;
}
Transmission
RS485 transmission is straightforward due to the AUTO feature, which automatically enables the transmitter when data is ready. The following software example is for non-AUTO operation.
To transmit data, first check Bit 5 of the Line Status Register at Base Address +5 (transmitter-holding-register-empty flag). If high, the transmitter has sent data. This process repeats until no data remains.
The following C code fragment demonstrates this:
outportb(BASEADDR +4, inportb(BASEADDR +4)|0x02); /*Set RTS bit without altering states of other bits*/
while(data[i]) {
/*While there is data to send*/
while(!(inportb(BASEADDR +5)&0x20)); /*Wait until transmitter is empty*/
outportb(BASEADDR,data[i]);
i++;
}
outportb(BASEADDR +4, inportb(BASEADDR +4)&0xFD); /*Reset RTS bit without altering states of other bits*/
Chapter 6: Connector Pin Assignments
The popular 9-pin D subminiature connector is used for communication lines. It features 4-40 threaded standoffs for strain relief.
Table 6-1: Connector Pin Assignments
Pin No. | RS485 Functions |
---|---|
1 | |
2 | Tx+ and Rx+ |
3 | Tx- and Rx- |
4 | |
5 | GND Ground |
6 | |
7 | |
8 | |
9 |
Appendix A: Application Considerations
Introduction
Working with RS422 and RS485 devices is similar to RS232, but these standards overcome RS232 deficiencies. RS232 has short cable lengths (under 50 feet at 9600 baud) and is susceptible to noise. RS422 permits cable lengths up to 5000 feet and is more immune to induced noise due to its differential mode operation.
Table A-1: Connections Between Two RS422 Devices
Connections between two RS422 devices (with CTS ignored):
Device #1 | Device #2 | ||
---|---|---|---|
Signal | Pin No. | Signal | Pin No. |
Gnd | 7 | Gnd | 7 |
TX+ | 24 | RX+ | 12 |
TX- | 25 | RX- | 13 |
RX+ | 12 | TX+ | 24 |
RX- | 13 | TX- | 25 |
A third RS232 deficiency is that only two devices can share a cable. RS422 also has this limitation, but RS485 allows up to 32 devices on the same twisted pairs. An exception is that multiple RS422 devices can share a single cable if only one device transmits and the others only receive.
Balanced Differential Signals
RS422 and RS485 devices offer longer lines and better noise immunity than RS232 due to their balanced differential drive method. In this system, the voltage produced by the driver appears across a pair of wires. A balanced line driver produces a differential voltage from +2 to +6 volts. It may have an "enable" signal to connect or disconnect the driver from the line, referred to as "tristate" condition (high impedance). RS485 drivers require this control; RS422 drivers may have it.
A balanced differential line receiver senses the voltage state across the two signal input lines. A differential input voltage greater than +200 mV results in a specific logic state; less than -200 mV results in the opposite state. The maximum operating voltage range (+6V to -6V) accommodates voltage attenuation on long cables.
A maximum common mode voltage rating of +7V provides good noise immunity. A signal ground line connection is necessary to keep the common mode voltage within this range; operation without it may be unreliable.
Table A-2: RS422 Specification Summary
Parameter | Conditions | Min. | Max. |
---|---|---|---|
Driver Output Voltage (unloaded) | 4V | 6V | |
Driver Output Voltage (loaded) | LD and LDGND jumpers in | 2V | -2V |
Driver Output Resistance | 50Ω | ||
Driver Output Short-Circuit Current | +150 mA | ||
Driver Output Rise Time | 10% unit interval | ||
Receiver Sensitivity | +200 mV | ||
Receiver Common Mode Voltage Range | +7V | ||
Receiver Input Resistance | 4KΩ |
To prevent signal reflections and improve noise rejection in RS422 and RS485 modes, the cable end should be terminated with a resistance equal to the cable's characteristic impedance. An exception is when an RS422 driver is never "tristated"; it provides low impedance termination at its end.
Note: Termination resistors for Tx+/Rx+ and Tx-/Rx- lines are provided on the card and are placed in the circuit when you install the LD jumpers (see Option Selection section).
RS485 Data Transmission
The RS485 Standard allows a balanced transmission line to be shared in a party-line mode, supporting up to 32 driver/receiver pairs on a two-wire network. Characteristics are similar to RS422, but the common mode voltage limit extends to +12V to -7V. Drivers must withstand this range while tristated.
Figure A-1: Typical RS485 Two-Wire Multidrop Network
This illustration shows a typical RS485 multidrop or party line network. It depicts multiple devices connected via a two-wire party line. Termination resistors are placed at both ends of the line, not at intermediate drop points. The diagram shows signal lines (T for transmitter, R for receiver) and enable signals for TX and RX for each device.
RS485 Four-Wire Multidrop Network
An RS485 network can also use a four-wire mode. In this configuration, one node acts as a master, and all others are slaves. The master communicates with all slaves, and slaves communicate only with the master. This is advantageous for mixed protocol communications, as slaves do not listen to other slaves' responses, preventing incorrect replies.
Customer Comments
If you experience any problems with this manual or wish to provide feedback, please email manuals@accesio.com. Detail any errors found and include your mailing address for manual updates.
ACCES I/O PRODUCTS, INC.
10623 Roselle Street, San Diego CA 92121
Tel. (858)550-9559 FAX (858)550-7322
Assured Systems
Assured Systems is a leading technology company with over 1,500 regular clients in 80 countries, deploying over 85,000 systems to a diverse customer base in 12 years of business. They offer high-quality and innovative rugged computing, display, networking, and data collection solutions to the embedded, industrial, and digital-out-of-home market sectors.
US Contact:
Sales: +1 347 719 4508
Support: +1 347 719 4508
1309 Coffeen Ave
Ste 1200
Sheridan
WY 82801
USA
EMEA Contact:
Sales: +44 (0)1785 879 050
Support: +44 (0)1785 879 050
Unit A5 Douglas Park
Stone Business Park
Stone
ST15 0YJ
United Kingdom
VAT Number: 120 9546 28
Business Registration Number: 07699660