Copyright Notice This documentation and the software included with this product are copyrighted 2001 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 Ordering Information .......................................................... 5 Chapter 2: Hardware Configuration .............................
Windows NT Driver Setup ................................................. 43 Steps for Windows NT Driver Setup ................................ 43 Start the Device Function in Windows NT ...................... 47 Verify your NT driver Setup ............................................. 48 Verify your NT Driver Function ...................................... 49 Stop the Device Function in Windows NT ...................... 50 Chapter 4: ICOM Tools .................................................
RS-485 signal wiring ........................................................ 71 Termination resistor setup.................................................
CHAPTER 1 Introduction Chapter 1 Introduction 1
Description The PCI Local Bus is a high-performance bus that provides a processor-independent data path between the CPU and high-speed peripherals. PCI is a robust interconnect mechanism designed specifically to accommodate multiple high performance peripherals for series communication, SCSI, LAN, etc. Advantech serial communication cards leverages the " Plug and Play " capability defined in the PCI 2.1 bus specification.
• OS supported: Windows NT, Windows 95, Windows 98 • Optional surge protection • Optional isolation protection for RS-422/485 • Interrupt status register for increased performance • Space reserved for termination resistors • Automatic RS-485 data flow control Specifications • Bus Interface: PCI bus specification 2.1 compliant • IRQ: all ports use the same IRQ assigned by PCI Plug-and-Play • Data bits: 5, 6, 7, 8 • Stop bits: 1, 1.
• Power requirement : Typical PCI-1620 Max 120 mA (+12 V) 150 mA (+12 V) 180 mA (+5 V) 220 mA (+5 V) 60 mA (+12 V) 80 mA (+12 V) 150 mA (+5 V) 180 mA (+5 V) PCI-1601 220 mA 270 mA PCI-1602 250 mA 300 mA PCI-1612 60 mA (+12 V) 80 mA (+12 V) 270 mA (+5 V) 340 mA (+5 V) PCI-1610 • Dimensions: 185 mm x 100 mm (for PCI-1612/1620) 123 mm x 92 mm (for PCI-1601/1602/1610) • Operating temperature: 0o ~ 65o C (referring to IEC 68-2-1, 2) • Operating Humidity: 5 ~ 95% Relative Humidity, non-cond
Ordering Information PCI-1601A: 2-port RS-422/485 PCI Comm Card PCI-1601B: 2-port RS-422/485 PCI Comm Card, w/surge protection PCI-1602A: 2-port RS-422/485 PCI Comm Card.
6 PCI Comm Card Series User's Manual
CHAPTER Hardware Configuration Chapter 2 2 Hardware Configuration 7
Initial Inspection You should find the following items inside the shipping package (in addition to this manual): • PCI communication interface card • Advantech Automation Software • PCI communication card user's manual We carefully inspected the PCI communication card series mechanically and electrically before we shipped it. It should be free of marks and scratches and in perfect working order on receipt.
Jumper and Switch Locations PCI-1601 Silk Screen Chapter 2 Hardware Configuration 9
PCI-1602 Silk Screen 10 PCI Comm Card Series User's Manual
PCI-1610 Silk Screen Chapter 2 Hardware Configuration 11
PCI-1612 Silk Screen 12 PCI Comm Card Series User's Manual
PCI-1620 Silk Screen Chapter 2 Hardware Configuration 13
Jumper settings This section tells how to set the jumpers to configure your card. It gives the card default configuration and your options for each jumper. How to set jumpers You configure your card to match the needs of your application by setting jumpers. A jumper is the simplest kind of electric switch. It consists of two metal pins and a small metal clip (often protected by a plastic cover) that slides over the pins to connect them. To “close” a jumper you connect the pins with the clip.
Card installation Warning! Turn off your PC’s power supply whenever you install or remove the PCI communication card 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. See the static warning on page 6 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.
RS-422/485 selection (for PCI-1601/1602/ 1612) You can set each port individually for either RS-422 (the default) or RS-485 operation. The figure below shows the jumper settings. See the "Jumper and Switch Locations" figure from page 7 to 11 for help to locate the jumpers. RS-485 485 422 RS-422 (default) 485 422 Enable mode selection You set the Enable mode using two- or four- position DIP switches, one for each port.
CHAPTER Driver Setup & Installation Chapter 3 3 Driver Setup & Installation 17
Overview This chapter describes the driver installation, configuration and removal procedures for Windows 95/98, and Windows NT. We strongly recommend that you install the software driver first before you install the hardware into your system, since this will guarantee a smooth and trouble-free installation process.
Windows 95/98 Driver Setup Windows 95/98 supports up to 256 serial ports, from COM1 to COM256. Advantech PCI ICOM driver, however, will start to assign port numbers beginning from COM 5. In order to fully utilize Windows 95/98 advanced features such as multi-process and multithread , we offer pure 32-bit Windows 95/98 virtual device port drivers, which are compliant with communication drivers, for the PCI1601/ 1602/ 1610/ 1612/ 1620 multiport boards.
4. Click the Next button and the License Agreement Page appears. 5. Click the Next button and the Choose Destination Location page appears.
6. Click Next to bring up the Select Program Folder dialog box. 7. The Driver Setup program will begin copying files to your system. 8. The Setup program will create the Advantech ICOM Tools program folder in the Start/Programs Menu.
9. After the installation process is completed, just click Finish to close the driver setup program. 10. After you have finished the driver installation, you need to reboot your system for proper functioning of your card.
Reboot your system after Win95/98 driver Setup PCI UARTs Device Driver Installation 1. On rebooting your system, Windows 95/98 will recognize your card devices and will search for the device driver for PCI UARTs automatically as shown in the following dialog box. 2. Choose “Search for the most Suitable Driver” radio button, and click Next.
3. You don’t have to choose the location of the device driver program, since it is already installed on your system. Just click Next to proceed. 4. Windows 95/98 has found the driver location and is ready to install the driver. Click Next.
5. You will be prompted to decide whether you want to install the Updated Driver. Accept the Updated Driver option and click Next. 6. The driver installation is complete. Click Finish.
PCI Bridge Device Driver Installation 7. After the PCI UARTs device driver has been installed, Windows 95/98 will proceed to recognize the PCI Bridge device. Just repeat similar steps as above to install the device driver for PCI Bridge.
8. After the PCI Bridge device driver is installed, a dialog box such as below will appear to indicate that Windows 95/98 has completed the device driver installation of the hardwares. Verify your Win95/98 Driver Setup After you have installed your card, go to Control Panel/System/ Device Manager to look for the Device Name that is supposed to appear after you have installed the driver.
Note: If your device has not been properly installed, there will be an exclamation mark (!) on the device name to indicate a conflicting device. If this is the case, just remove that device and start the driver installation process all over again. Or you can run COM Registry Clean Tool utility (by accessing Start/ Programs/Advantech PCI ICOM/COM Registry Clean Tool) to remove all Advantech PCI ICOM series devices from your system.
On the Settings tab, you can check up the relevant information of that specific port. As you can see on the figures below, the description for the communication port actually contains four parts: [DEV_0B] specifies the PCI slot in your system. PCI-1620 specifies the device model of Advantech PCI ICOM device. Port 1 specifies the port index for Advantech PCI ICOM device. RS-232 or RS-422/485 specifies the operating mode.
30 PCI Comm Card Series User's Manual
If you want to configure FIFO Properties, select FIFOs tab. On the tab, you can see the relevant FIFO configurations. We recommend you to use the default settings. However, you are allowed to set the configurations manually according to your preferences. If you want to restore the default settings, just click the Default Setting button.
2. Select Device Manager tab on the System Properties sheet. 3. Click the plus sign (+) on the right of the ADSPCIUART device category to expand it. As shown on the figure below, you can see Advantech PCI UARTs and Advantech PCI Bridge device names listed under the device category.
Configuring PCI UARTs Device 4. Double-click the Advantech PCI UARTs device to evoke its Properties page, and then select the Resource tab on the Properties page to look up or configure the current settings of the PCI UARTs device. 5.
with the default settings, click OK to accept. If you want to cancel the configuration, just click Cancel. Configuring PCI Bridge Device 6. Double-click the Advantech PCI Bridge device to evoke its Properties page, and then select the Resources tab on the Properties page to look up or configure the current configuration of the PCI Bridge device to make sure there is no conflicting device. Click other tabs to look up or configure the device. Note: 1.
device category to expand it, and then double-click the specific communication port to evoke its Properties page. Select specific tabs for configuring specific settings. 9. Select the Settings tab on the Properties page of the communica tion port to examine the port settings.
Note: As you can see on the figure of the previous page above, the description for the communication port contains four parts: [DEV_0B] specifies the PCI slot in your system. PCI-1620 specifies the device model of Advantech PCI ICOM device. Port 1 specifies the port index for Advantech PCI ICOM device. RS-232 specifies the operating mode. 10. Select the Data Rate tab to check up information about clock frequency, baud rate, etc.
11. Select FIFOs tab to have a look at the FIFO properties. Note: The Default Setting button can recover all the FIFO settings to their default values.
12. Select the Resource tab on the Properties page to look up the resource settings. Note:1. In Windows 95 there might appear a conflicting device, but it won’t do any harm. 2. The Input/Output Range information is helpful to recognize the communication port attached to the device.
1. Access Control Panel/System to bring up the System Properties sheet. 2. Select the Device Manager tab on the System Properties sheet. 3. Click the plus sign (+) on the right of the Ports (COM & LPT) device category to expand it. Select the specific “Advantech PCI communication port” you want to remove, and click the Remove button to remove the device you have selected.
4. The following dialog box will appear to prompt you again to make sure you really want to remove the device from your system. 5. Click the plus sign (+) on the right of the ADSPCIUART device category to expand it, and select Advantech PCI UARTs or Advantech PCI Bridge you want to remove. Note: You must remove all ports attached to the device before you remove the device itself.
6. Click the Remove button and the following dialog box appears to prompt you whether you really want to remove the device. Note: We recommend you to remove the original device before installing another model of Advantech PCI ICOM series device in the same PCI slot.
Steps for Complete Win98/98 Driver Uninstall If you want to uninstall the driver completely, please use the uninstaller utility, AdsCleaner, for a clean and safe driver uninstall. Please follow the steps below to proceed with the complete driver uninstall: 1. Access Start/Program/Advantech PCI ICOM/COM Registry Clearn Tool. 2. A dialog box will appear to make sure that you want to remove all the Advantech PCI ICOM devices from your system.
3. Click OK to begin removal of all PCI ICOM devices from your system. After the removal is complete, a message box will appear to prompt you for a reboot. Windows NT Driver Setup Windows NT supports up to 256 serial ports, from COM1 to COM256. Advantech PCI ICOM driver, however, will start to assign port numbers beginning from COM 5.
3. After the setup program is launched, you’ll see the following Setup Screen. 4. Click the Next button and the License Agreement page appears. 5. Click Yes to accept the terms as stated in the License Agreement. The Select Program Folder dialog box appears.
6. Just click Next to accept the default installation folder, and the Start Copying Files dialog box appears. (Or you can specify the folder name yourself, and then click Next). On the dialog box you can survey your current installation settings. If you are satisfied with these current settings,, just click Yes to complete your driver installation. If you are not satisfied with the settings, just click Back to return to the previous steps and go over again.
7. The Driver Setup Program will begin copying files to your system 8. The Setup program will create the Advantech ICOM Tools folder in the Start Menu.
9. After the installation process is completed, just click Finish to close the driver setup program. Start the Device Function in Windows NT After you have properly installed the driver, please start the function of your hardware device by the following steps: 1. Go to Start/Programs/Advantech PCI Comm Tools/COM Service Startup Tool.
2. The Advantech PCI Serial Service Manager dialog box appears. Choose to start your serial service by selecting the Start radio button and click OK. 3. A message box will appear to inform you that the PCI serial service has started successfully. Verify your NT driver Setup After you have installed your card, go to Control Panel/Port to look for the Com port name that is supposed to appear after you have installed the driver.
For proper functioning of the card, the Advantech PCI Serial Driver service must be started, too. If your card cannot function properly, please look into Control Panel/Devices to see if the Advantech PCI Serial Driver service is started. Verify your NT Driver Function You can verify the driver function by the Windows NT Diagnostics utility. As you can see on the Services tab, the status of the Advantech PCI serial driver is currently running. This indicates that the driver functions properly.
Stop the Device Function in Windows NT If you want to stop the device function, please follow the steps as seen below: 1. Go to Start/Programs/Advantech Driver for NT/AdsStart. 2. The Advantech PCI Serial Service Manager dialog box appears. Choose to stop your serial service by selecting the Stop radio button and click OK. 3. A message box will appear to inform you that the PCI serial service has been stopped.
CHAPTER ICOM Tools 4 Chapter 4 ICOM Tools
Introduction Advantech ICOM Tools is a very convenient utility to help you test the performance of ICOM card through port status analysing. It features a Graphical User Interface as easy to use as you will soon get familiar with all the menu commands and toolbar buttons. Advantech ICOM Tools is applicable to all series of Advantech ICOM cards, even to other third-party ICOM cards. It is included for free on the diskette or on the companion CD-ROM with all the Advantech ICOM cards.
All Ports Submenu Setup setup the configurations of all ports Run run the test on all ports Stop stop the test on all ports Help submenu access the Online Help (for specific port) (for all ports) Using Tool Bar buttons is a more intuitive way to implement the functions of the ICOM Tools utility.
All Ports Stop stop test on all ports Clear Message clear messages on Message Logo area and the Rx length information on the Performance Listing area Each Com Port tab represents a specific port you have selected for test and configuration. On the tab, you can see the Transfer Mode, Port Status, and Message Logo area. Transfer Mode You can specify the transfer mode to be Normal, loopback (active) and loopback (passive) Normal—allows data to be transmitted and received simultaneously.
DSR (data-set-ready) RTS (request-to-send) CTS (clear-to-send) CD (carrier-detect) For RS-232 specifications, DTR and RTS are for output signals and can be toggled on and off simply by double-clicking legends (such as DTR, DSR, RTS, CTS, CD) under the red/green marks. But if your are using RTS/CTS for flow control to run the test, you will see the RTS mark appear as black. This indicates that the RTS can no longer be toggled on/off since it is now controlled by driver itself.
On the performance listing area, you can see the relevant information, such as Rx Length (received packet byte length), Bytes/Sec (transmission rate) and Last Abnormal Status of each port running a test. The Status Bar is where you can glimpse the current information of the port you have selected.
such as Figure 1. Since you haven’t selected any port for testing yet, all you can see now is only a blank window area. Fig. 1 ICOM Tools program window Step 2:Select the port(s) you want to test by the Port/Select menu command or by clicking the Port Select button on the Toolbar, and a dialog box such as Fig. 2 will appear. Fig. 2 Select Port dialog box Step 3: Select the port(s) you want to perform test on from the Port checkbox group.
port(s) you selected will immediately appear in the Selected Port field. Fig. 3 Ports you selected will appear in the Selected Port checkbox group. Step 4: Click OK to bring up the ICOM Tools User Interface such as below: Tx Silde Bar Menu Bar Tool Bar Com Port Tab Performance Listing Transfer Mode Port Status Message Logo Status Bar Fig. 4 ICOM Tools User Interface 4.3.
You can choose to configure a specific port (or to configure all ports) before running your test. Just click a Com Port Tab to select the port you want to configure, and then click the Port Setup button or just access the Port/Setup menu command (or if you want to configure all ports at once, just click the All Ports Setup button or access the All Ports/Setup menu command) to bring up the Configure Port dialog box such as below.
run all ports at once, just click the All Ports Run All Ports/Run menu command). button or access Once the test is started, you can see relevant test information of port performance on the performance listing area.
Close Port If you want to close a port, just select the Com Port tab and click Port Close port. button or access Port/Close menu command to close the Exit the ICOM Tools utility To exit the ICOM Tools utility, simple access Port/Exit menu command or click the Close button on the upper right corner of the program window.
Tx Starting/Tx Stopped: transmitting starting/transmitting stop Rx Starting/Rx Stopped : receiving starting/receiving stop Break Error: a break event has been detected on the port Framing Error: A timing error (i.e.
CHAPTER 5 Pin Assignment & Wiring Chapter 5 Pin Assigment & Wiring 63
Pin assignments PCI-1601/1602 The following figures show the pin assignments for the card's DB-9 connectors in RS-422 and RS-485 modes.
PCI-1610/1612 The following diagrams show the pin assignments for the PCI-1610/ 1612 card's DB-37 and DB-25 connectors for RS-232.
PCI-1612 The following diagrams show the pin assignments for the PCI-1612 card's DB-37 and DB-25 connectors for RS-422/485.
PCI-1610/1612 The following diagrams show the pin assignments for the PCI-1610/ 1612 card's DB-37 and DB-9 (opt 4A) connectors for RS-232.
PCI-1612 The following diagrams show the pin assignments for the PCI-1610/ 1612 card's DB-9 and DB-25 (opt 4A)connectors for RS-422/485.
PCI-1620 RS-232 8-port connection boxes/octopus cable designed for PCI-1620 are: Opt8A: Opt8B: Opt8C: 8-port DB25 female connection box 8-port DB25 male connection box Octopus cable with 8 male RS-232 DB25 ports The following lists the pin assignments of the DB62 connector on the bracket. You may fabricate octopus cable for DB25 to 8 x DB25 with these pinouts. Pin no. Signal Pin no. Signal Pin no.
DB25 Pinout DB9 Pinout Ground 7 5 TD Transmit Data 2 3 Output RTS Request To Send 4 7 Output DTR Data Terminal Ready 20 4 Output RD Receive Data 3 2 Input CTS Clear To Send 5 8 Input DSR Data Set Ready 6 6 Input DCD Data Carrier Detect 8 1 Input Ring Indicator 22 9 Input Signal GND RI 70 Name PCI-Comm Card Series User's Manual Mode
Wiring RS-232 signal wiring Since the RS-232 interface is not strictly defined, many devices have their own connection methods which may ignore some signal lines or define reserved lines for other functions. It is best to refer to the user’s manual for your device for installation instructions. You may find the following helpful. In general, DTE (Data Terminal Equipment) refers to the device that is leading the communication. Examples include PC’s, terminals and some printers.
Modem connections DB-25 Male Modem (DCE) Pin 2 Signal TxD Pin 2 Signal RxD 3 RxD 3 TxD 4 RTS 4 CTS 5 CTS 5 RTS 6 DSR 6 DTR 7 GND 7 GND 20 DTR 20 DSR 8 DCD 8 DCD For DTE to DCE connections, use straight through cable (i.e., you don't have to reverse lines 2 and 3, lines 4 and 5, and lines 6 and 20 since, in general, the DCE RS-232 interfaces are reversed themselves).
RS-422 signal wiring The RS-422 interface wiring is based on one-to-one principles. The transmit lines on one side connect to the receive lines on the other side, and vice versa. With RS-422, you can transmit and receive data simultaneously (full duplex).
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 PCI-1601/1602/ 1612 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 or 300 Ohms).
APPENDIX A Register structure and format Appendix A Register Structure and Format 73
Register Structure This appendix gives short descriptions of each of the module's registers. For more information please refer to the data book for the STARTECH 16C550 UART chip. All registers are one byte. Bit 0 is the least significant bit, and bit 7 is the most significant bit. The address of each register is specified as an offset from the port base address (BASE), selected with DIP switch SW1 or SW2. DLAB is the "Divisor Latch Access Bit:, bit 7 of BASE+3.
BASE+1 BASE+2 BASE+3 Interrupt Status Register (ISR) when DLAB=0 Bit 0 Enable received-data-available interrupt bit 1 Enable transmitter-holding-register-empty interrupt bit 2 Enable receiver-line-status interrupt bit 3 Enable modem-status interrupt FIFO Control Register (FCR) bit 0 Enable transmit and receive FIFOs bit 1 Clear contents of receive FIFO bit 2 Clear contents of transmit FIFO bits 6-7 Set trigger level fro receiver FIFO interrupt.
bit 7 BASE+4 BASE+5 Divisor Latch Access Bit (DLAB) Modem Control Register (MCR) bit 0 DTR bit 1 RTS Line Status Register (LSR) bit 0 Receiver data ready bit 1 Overrun error bit 2 Parity error bit 3 Framing error bit 4 Break interrupt bit 5 Transmitter holding register empty bit 6 Transmitter shift register empty bit 7 At least one parity error, framing error or break indication in the FIFO BASE+6 BASE+7 76 Modem Status Register MSR) bit 0 Delta CTS bit 1 Delta DSR bit 2 Trail
Programming example The following C example shows how to program the PCL-743/745 registers directly. It uses I/O ports hex 3F8 and 2F8 to test the PCL743/745 send, receive and FIFO functions. / ***************************************************/ /* Program: DEM001.C */ /* Description: */ /* Sends a string from COM1 to COM2 then reads */ /* it back from COM2 and displays it on the */ /* screen. It uses direct register control.
/* Set up Port 1 (COM1) */ outport((base0+2),0xc9); /* outp(base1+3,0x80); Set DLAB=1 Enable FIFO */ /* */ /*Set bps = 115200 */ outp(base0 ,0x01); outp(base0+1,0x00); outp(base0+3,0x03); /* set data=8; stop=1; no parity*/ outp(base0+1,0x00); /* disable interrupt */ /* (Set up) Port 2 (COM2) outport((base1+2),0xc9); */ /* outp(base1+3,0x80); Set DLAB=1 Enable FIFO */ /* */ /* Set bps = 115,200 */ outp(base1 ,0x01); outp(base1+1,0); outp(base1+3,0x03); /* Set data=8; stop=1; no parity*/ oupt(ba
*/ if (cmd[i] == 0x0d) flag=0 i++; } /* Receive data on Port 2 (COM2) */ i=0; flag=1; timeout=TIME_OUT; whole (flag) { rec[i]=inportb(base1); /* Receive data*/ if (rec[i] == 0x0d) { rec[i=1]='\0'; flag=0; printf("\nReceived data: %s\n", rec); } i++; { } else /I Check timeout */ timeout-; if(timeout == 0) { flag=0; print("\nTimeout error\n"); } } } /* End of receive data while() */ printf("\nEnter string (max 15 char) or Q to quit:"); gets(cmd); } /*End of "Enter string"while() */ } /*End of main() */
80 PCL-743/745 Series User's Manual
APPENDIX PC I/O address reference Appendix B B PC I/O Address Reference 81
The following table shows the I/O addresses commonly used by standard PC devices. Avoid these addresses when you select your port I/O base addresses.