PCL-846/847 4-Port RS-422/485 Interface Card
Copyright Notice This documentation and the software included with this product are copyrighted 1998 by Advantech Co., Ltd. All rights are reserved. Advantech Co., Ltd. reserves the right to make improvements to the products described in this manual at any time without notice. No part of this manual or software may be reproduced, copied, translated or transmitted, in any form or by any means without the prior written permission of Advantech Co., Ltd.
Contents Chapter 1: Introduction ................................................... 1 Description ................................................................................................. 2 Features ...................................................................................................... 2 Specifications ............................................................................................. 3 Card Jumper Layout .....................................................................
CHAPTER Introduction 1
Description PCL-846/847 series cards provide four independent RS-422/485 serial ports on a card. Each port has a 16C550 UART with an on-chip 16byte FIFO buffer for reliable, high-speed serial I/O. The UART buffers data into 16-byte packets before putting it on the bus. This drastically reduces the CPU load and avoids data loss when the system is busy and cannot process the interrupt quickly. The UART is especially useful for high speed serial I/O under Windows.
• Provides 2000 VDC surge protection (PCL-846B/847B) • Space reserved for termination resistors • Supports 2 wire or 4 wire operation • Supports Tx, Rx, RTS, and CTS signals • Automatic RS-485 data flow control or RTS control • RS-422 on Auto/RTS/On mode Specifications • Ports: 4 • UART: 4 x 16C550 with 16-byte FIFO • Speed: 50 ~ 921.
Figure 1-1: PCL-847 switch and jumper layout Card Jumper Layout 4 PCL-846/847 User's Manual
Chapter 1 Introduction Figure 1-2: PCL-846 switch and jumper layout 5
6 PCL-846/847 User's Manual
CHAPTER Hardware Installation 2
Initial Inspection Depending on the option you ordered, in addition to this manual, you should find the following items inside the shipping container: • PCL-846(A/B) or 847(A/B) 4-port RS-422/485 card • One 30-cm male DB-37 to four male DB-9 cable • One diskette with PCLS-802 PC-ComLIB software • One PC-ComLIB user's manual • One diskette with Windows 95/98/NT drivers (Icom Utility) • PCL-846/847 manual We have carefully inspected the PCL-846/847 mechanically and electrically before shipping.
Card Installation Warning! Turn off your PC’s power supply whenever you install or remove the PCL-846/847 or its cables. Static electricity can easily damage computer equipment. Ground yourself by touching the chassis of the computer (metal) before you touch any boards. 1. Turn off the computer. Turn the power off to any peripheral devices (such as printers and monitors). 2. Disconnect the power cord and any other cables from the back of the computer. Turn the PC if necessary to gain access to the cables.
Card Configuration The ports on the PCL-846/847 card have jumpers and DIP switches which require configuration before the card is used. DIP switches set the port I/O addresses and speed modes. Jumpers set the port IRQs. Default Settings The board is shipped with default settings. If you need to change these settings, however, see the following sections. Otherwise, you can simply install the card.
I/O Address and Interrupt Setup Next, you will need to select an I/O base address, and port IRQ (interrupt request) numbers for the PCL-846/847 . Mode Setup (base address setting, S2) The card base address can be set using the DIP switches on the card. The DIP switch labelled "MODE 1" will set the card to standard or enhanced mode, as shown below. Standard Mode In this mode, each of the four ports has a pre-assigned address, as shown below.
Enhanced Mode In the enhanced mode, the card base address is set by the user. Select an address which is not already being used by another card in the system. If you are installing more than one PCL-846/847 card in your system, set the cards to different base addresses. DIP switches on S1 control each card's base address, as shown below.
The following example shows how to set the card base address to 2F8. The switch sum is set to 2F8: 200 + 80 + 40 + 20 + 10 + 8 (HEX). Note: On the PCL-846/847, the address line A9 does not appear on the DIP switch, as it is permanently hardwired to hex 200. Interrupt Level (IRQ) Setting (S2, JP11, JP12, JP13, JP14) The card's IRQ mode can be set using S2. Please note that the DIP switch on S2 labelled MODE 0 is for setting the mode, as shown below.
Independent IRQ Mode (JP11-JP14) In this mode, each of the four ports can have IRQ channels set individually. For each port, select an IRQ which is not already in use by another card in the system. The mapping of jumpers to ports is as shown below. Port 1 à JP11 Port 2 à JP12 Port 3 à JP13 Port 4 à JP14 Shared IRQ Mode (JP11) Select an IRQ which is not already in use by another card in the system. If you are installing more than one PCL-846/847, set them to different IRQ numbers.
the bit is 1, then no interrupt is generated. The following table shows the correspondence between the status register bit which gets set to 0 and the port assigned to generate an interrupt. Interrupt Status Register S2 Bit Function 0 Port 1 1 Port 2 2 Port 3 3 Port 4 4 Not Used 5 Not Used 6 Not Used 7 Not Used A user may change the interrupt status registers' address using the DIP switch S2.
16 A4 A5 A6 A7 A8 Interrupt Register ON ON ON ON ON 200H OFF ON ON ON ON 210H ON OFF ON ON ON 220H OFF OFF ON ON ON 230H ON ON OFF ON ON 240H OFF ON OFF ON ON 250H 260H ON OFF OFF ON ON OFF OFF OFF ON ON 270H ON ON ON OFF ON 280H OFF ON ON OFF ON 290H ON OFF ON OFF ON 2A 0H OFF OFF ON OFF ON 2B 0H ON ON OFF OFF ON 2C 0H OFF ON OFF OFF ON 2D 0H ON OFF OFF OFF ON 2E 0H OFF OFF OFF OFF ON 2F 0H 300H ON ON ON
Speed Mode Selection The PCL-846/847 employs a unique speed option that allows the user to choose either normal speed mode (1x) or high speed mode (8x). This high speed mode is selected using switch S1. Normal Speed Mode (S1, default) To select a baud rate commonly associated with COM ports , such as 2400, 4800, 9600. . .115.2 Kbps, set the switch labelled "SPEED" to off, as shown: High Speed Mode (S1) To increase the normal baud rates by eight times, (e.g. if 115.
Enable Mode Selection (JP4, JP6, JP8, JP10) Jumpers JP4, JP6, JP8 and JP10 set the driver enable mode selections of ports 1, 2, 3, and 4 respectively. If a jumper is set to "AUTO," the driver automatically senses the direction of the data flow and switches the direction of transmission. No handshaking is necessary. If a jumper is set to "RTS" (request to send), a high RTS signal will enable the driver. Otherwise, the driver output will remain in high impedance status.
CHAPTER Software Installation 3
Operating Environment Selection Set jumper 15 (JP15) to correspond with your desired software operating environment. Connect the left two pins of JP15 to operate in DOS or Windows 3.1 mode, as shown below. Connect the right two pins to operate in Windows 95 or Windows NT mode . 1 JP15 DOS, Windows 3.1 1 JP15 Windows 95, Windows NT Driver Installation for DOS Users Make a duplicate copy of the driver diskette in case the original disk becomes lost or damaged.
Driver selection screen After the screen shows up, move the cursor bar (using the arrow keys or the mouse) to the general serial board field and press ENTER. The screen shown below will appear.
Here you can set the configuration for each of the PCL-846/847 cards installed in the system. Set the IRQ, base address, baud rate, buffer size and port number to match the card's configuration. Do this by moving the highlight to the field you want to set up. Press ENTER and a menu will appear, allowing you to select the correct setting. The setup program also controls the port number assignments for each card. When you use a driver function in your program, you will identify the ports by these assignments.
When you are finished setting up the ports, press the ESC key to return to the previous windows. Press F10 to save the new configuration or ESC to quit without saving. The setup program will then create a new configuration data file GEN-DRV.CNF. DOS driver installation You must install the PCL-846/847 card driver (GEN-DRV.EXE) before you run any application programs, including the DataScope utilities.
Programming The following code fragment illustrates how the library functions can simplify card programming, reducing setup time and avoiding bugs. The following C program shows a simple data transfer test. It uses a PC-ComLIB function call to send data between Port 1 and Port 2 at a rate of 57.6 Kbps. /* Execute the PC-ComLIB TSR driver first*/ #include
Driver Installation for Windows 3.1 Users Windows 3.1 provides a versatile and easily configurable interface that supports up to four COM ports with a standard driver. The PCComLIB Standard Windows COMM Driver, along with PCL-846/ 847, allow users to install up to six serial ports under Windows 3.1. The Standard Windows COMM Driver supports Microsoft Windows COMM API (Application Programming Interface) such as OpenComm(), ReadComm(), and WriteComm().
A maximum of 6 ports is supported if the existing standard COM ports (COM1 and COM2) are included. For example, you can set one serial port on the motherboard for COM1 (0x3F8, IRQ4), while designating COM2-5 on IRQ3 for the four ports on a PCL-846/847 card. Note: If using a serial mouse, it must be installed on either COM1 (0x3F8, IRQ4) or COM2 (0x2F8, IRQ3), and must have its own dedicated IRQ.
1.Run Setup.exe on the driver diskette. 2.Select “Advantech Icom Utility” to install and configure the board, following the on-line instructions. 3.After the Advantech Icom Utility configuration panel pops up, please refer to the software help file for more details. 4.Following completion of the installation, restart Windows 95. Following completion of installation, please restart your system as prompted.
PCL-846/847 series cards can be installed together in a single system as long as the system memory resources are sufficient and available in a system. Different boards should be assigned different IRQs. Click the [Share IRQ Enable] button to set the share IRQ function. Share IRQ: 3, 4, 5, 6, 7, 9, 10, 11, 12, 15 Vector Address: 200H ~ 3F0H After you finish the installation, you can click [Exit] and restart your system. Unless the system is restarted, the latest configuration will not take effect.
CHAPTER Wiring C h t a 4 p e r
Pin assignments The following figures show the pin assignments for the card's DB-9 connectors in RS-422 and RS-485 modes.
RS-485 signal wiring The RS-485 standard supports half-duplex communication. This means that just two wires are needed to both transmit and receive data. Handshaking signals (such as RTS, Request To Send) are normally used to control the direction of the data flow and to switch the transmission accordingly. In RS-485 mode, the PCL-846/847 automatically senses the direction of the data flow and switches the transmission direction — no handshaking is necessary.
Termination resistor setup You can install termination resistors if necessary for impedance matching. The card has mounting spaces for termination resistors, but no resistors are installed at the factory. Depending on your application you may need to solder in a single resistor to handle the DATA+/ DATA- pair (and a corresponding resistor on the other end of the connection). The value of the resistor should equal the characteristic impedance of the signal wires (approximately 120 Ohms).
APPENDIX PC I/O Address Reference A Appendix A PC I/O Address Assignments 33
PC I/O Address Usage The following table indicates the PC I/O address usage assignment. To prevent conflicting settings of the PCL-846/847 with other devices or I/O cards, you are recommended to refer this table.
APPENDIX Quick Reference B Appendix B Quick Reference 35
Ø Switch Setting · IRQ Mode DIP 1 (MODE 0) of S2 is used to set the IRQ mode of this card. DIP1 : ON (Upper) position è Shared IRQ mode DIP1 : OFF (Lower) position è Independent IRQ mode · STANDARD/ ENHANCED Mode DIP 2 (MODE 1) of S2 is used to set the Standard/enhanced mode of this card. DIP1 : ON (Upper) position è STANDARD mode DIP1 : OFF (Lower) position è ENHANCED mode Ø Software Operating System Mode Connect the left two pins of JP15 to use DOS, Windows 3.
· STANDARD/ ENHANCED Mode STANDARD MODE: In this mode, the I/O addresses and IRQ levels of each port are set to their default values, as shown below. (Disable BIOS settings of on-board COM1 ~ COM4 ports) Po r t N o . I/O Ad d r es s COM Po r t No .
Ø Enable mode selection: (JP4, JP6, JP8, JP10) ·Auto: automatically senses the direction of data flow ·RTS: high RTS signal enable ·ON: always high or low status for RS-422 mode 38 PCL-846/847 User's Manual