Home
MODEL PCI-COM485/4 USER MANUAL
Contents
1. 0x03 The final initialization step is to flush the receiver buffers You do this with two reads from the receiver buffer at Base Address 0 When done the UART is ready to use Reception Reception can be handled in two ways polling and interrupt driven When polling reception is accomplished by constantly reading the Line Status Register at Base Address 5 Bit 0 of this register is set high whenever data are ready to be read from the chip A simple polling loop must continuously check this bit and read in data as it becomes available The following code fragment implements a polling loop and uses a value of 13 ASCII Carriage Return as an end of transmission marker do while inporto BASEADDR 5 amp 1 Wait until data ready data i inportb BASEADDR while data i 13 Reads the line until null character rec d Interrupt driven communications should be used whenever possible and is required for high data rates Writing an interrupt driven receiver is not much more complex than writing a polled receiver but care should be taken when installing or removing your interrupt handler to avoid writing the wrong interrupt disabling the wrong interrupt or turning interrupts off for too long a period The handler would first read the Interrupt Identification Register at Base Address 2 If the interrupt is for Received Data Available the handler then reads the data If no interrupt is pending control exits the routine
2. A sample handler written in C is as follows readback inportb BASEADDR 2 if readback amp 4 Readback will be set to 4 if data are available data i inporto BASEADDR outportb 0x20 0x20 Write EOI to 8259 Interrupt Controller return Transmission RS485 transmission is simple to implement The AUTO feature of the card automatically enables the transmitter when data is ready to send so no software enabling is required The following software example is for non AUTO operation To transmit a string of data the transmitter must first check Bit 5 of the Line Status Register at Base Address 5 That bit is the transmitter holding register empty flag If it is high the transmitter has sent the data The process of checking the bit until it goes high followed by a write is repeated until no data remains The following C code fragment demonstrates this process 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 amp 0x20 Wait until transmitter is empty outportb BASEADDR datarli j outportb BASEADDR 4 inportb BASEADDR 4 amp 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 interfacing to communication lines The connector is equipped with 4 40 threaded standoffs femal
3. Introduction This Serial Interface Card was designed for effective multipoint transmission in RS485 ElA485 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 1 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 rin
4. range while in the tristate condition The following illustration shows a typical multidrop or party line network Note that the transmission line is terminated on both ends of the line but not at drop points in the middle of the line TERMINATION RESISTORS AT BOTH ENDS ONLY IX ENASL IX FNAHI RX ENA I RX ENAJLE Figure A 1 Typical RS485 Two Wire Multidrop Network RS485 Four Wire Multidrop Network An RS485 network can also be connected in a four wire mode In a four wire network it s necessary that one node be a master node and all others be slaves The network is connected so that the master communicates to all slaves and all slaves communicate only with the master This has advantages in eguipment that uses mixed protocol communications Since the slave nodes never listen to another slave s response to the master a slave node cannot reply incorrectly Customer Comments If you experience any problems with this manual or just want to give us some feedback please email us at tech portwell com Please detail any errors you find and include your mailing address so that we can send you any manual updates
5. the assigned resources Run one of the provided sample programs that was copied to the newly created card directory from the CD to test and validate your installation Chapter 3 Option Selection To help you locate the jumpers described in this section refer to the Option Selection Map at the end of this section Operation of the serial communications section is determined by jumper installation as described in the following paragraphs 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 1200 load across the transmit receive input output for RS485 operation Tx Rx DXO 120 Q1IHF TX Rx Figure 3 1 Simplified Termination Schematic In RS485 operations where there are multiple terminals only the RS485 ports at each end of the network should have terminating impedance as described above To so terminate the COMA port place a jumper at the location labeled LDAO To terminate the COM B COM C and COM D ports place jumpers at locations labeled LDBO LDCO and LDDO respectively Also for RS485 operation there must be a bias on the RX and RX lines If the card is not to provide that 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 t
6. 230400 2 1400 ft 153600 3 2500 ft 115200 1 4 3000 ft 57600 2 8 4000 ft 38400 3 12 4000 ft 28800 4 16 4000 ft 19200 6 24 4000 ft 14400 8 32 4000 ft 9600 12 48 Most Common 4000 ft 4800 24 96 4000 ft 2400 48 192 4000 ft 1200 96 384 4000 ft Recommended maximum distances for differentially driven data cables RS422 or RS485 are for typical conditions Table 5 1 Baud Rate Divisors In C the code to set the chip to 9600 baud is outportb BASEADDR 0x0C outportb BASEADDR 11 0 In C the code to set the chip to 9600 baud is outportb BASEADDR 0x0C outportb BASEADDR 11 0 The second initializing step is to set the Line Control Register at Base Address 3 This register defines word length stop bits parity and the DLAB Bits O and 1 control word length and allow word lengths from 5 to 8 bits Bit settings are extracted by subtracting 5 from the desired word length Bit 2 determines the number of stop bits There can be either one or two stop bits If Bit 2 is set to 0 there will be one stop bit If Bit 2 is set to 1 there will be two stop bits Bits 3 through 6 control parity and break enable They are not commonly used for communications and should be set to zeroes Bit 7 is the DLAB discussed earlier It must be set to zero after the divisor is loaded or else there will be no communications The C command to set the UART for an 8 bit word no parity and one stop bit is outportb BASEADDR 3
7. MODEL PCI COM485 4 USER MANUAL FILE PCI COM485 4 Gb Notice The information in this document is provided for reference only Portwell 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 Portwell 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 Portwell I O Products Inc 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 Portwell equipment is thoroughly inspected and tested to applicable specifications However should equipment failure occur PortwellS assures its customers that prompt service and support will be available All equipment originally manufactured by Portwell 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 Portwell Customer Service depa
8. Output Resistance Lae 500 Driver Output Short Circuit Current MN 150 mA Driver Output Rise Time AO 10 unit interval Receiver Sensitivity NA 200 mV Receiver Common Mode Voltage Range Receiver Input Resistance Table A 2 RS422 Specification Summary To prevent signal reflections in the cable and to improve noise rejection in both the RS422 and RS485 mode the end of the cable should be terminated with a resistance equal to the characteristic impedance of the cable An exception to this is the case where the line is driven by an RS422 driver that is never tristated or disconnected from the line In this case the driver provides a low internal impedance that terminates the line at that end Note You do not have to add a terminator resistor to your cables when you use the card Termination resistors for the Tx Rx and Tx Rx lines are provided on the card and are placed in the circuit when you install the LD jumpers See the Option Selection section of this manual RS485 Data Transmission The RS485 Standard allows a balanced transmission line to be shared in a party line mode As many as 32 driver receiver pairs can share a two wire party line network Many characteristics of the drivers and receivers are the same as in the RS422 Standard One difference is that the common mode voltage limit is extended and is 12V to 7V Since any driver can be disconnected or tristated from the line it must withstand this common mode voltage
9. ased setup program can be used in conjunction with Chapter 3 to assist in configuring jumpers on the card as well as provide additional descriptions for usage of the various card options such as termination bias baud rate range RS 232 RS 422 RS 485 etc CD Software Installation The following instructions assume the CD ROM drive is drive D Please substitute the appropriate drive letter for your system as necessary DOS 1 Place the CD into your CD ROM drive 2 Type 2J Je to change the active drive to the CD ROM drive 3 Type Hng to run the install program 4 Follow the on screen prompts to install the software for this board WINDOWS 1 Place the CD into your CD ROM drive 2 The system should automatically run the install program If the install program does not run promptly click START RUN and type ol sl JAJ JJ click OK or press Ed 3 Follow the on screen prompts to install the software for this board LINUX 1 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 We do support installation in earlier versions of Windows and are very likely to support future versions as well Caution ESDA 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 touchin
10. e screw lock to provide strain relief RS485 Functions Tx and Rx Tx and Rx GND Ground BE ES EF ES Table 6 1 Connector Pin Assignments Appendix A Application Considerations Introduction Working with RS422 and RS485 devices is not much different from working with standard RS232 serial devices and these two standards overcome deficiencies in the RS232 standard First the cable length between two RS232 devices must be short less than 50 feet at 9600 baud Second many RS232 errors are the result of noise induced on the cables The RS422 standard permits cable lengths up to 5000 feet and because it operates in the differential mode it is more immune to induced noise Connections between two RS422 devices with CTS ignored should be as follows Table A 1 Connections Between Two RS422 Devices A third deficiency of RS232 is that more than two devices cannot share the same cable This is also true for RS422 but RS485 offers all the benefits of RS422 plus allows up to 32 devices to share the same twisted pairs An exception to the foregoing is that multiple RS422 devices can share a single cable if only one will talk and the others will all receive Balanced Differential Signals The reason that RS422 and RS485 devices can drive longer lines with more noise immunity than RS232 devices is that a balanced differential drive method is used In a balanced differential system the voltage produced by the driver appears ac
11. g the card Hardware Installation 1 o ARWN o N 10 11 Make sure to set switches and jumpers from either the Option Selection section of this manual or from the suggestions of SETUP EXE Do not install 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 Make sure that the card mounting bracket is properly screwed into place and that there is 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 of your system and verify that the PCI plug and play option is set appropriately for your system Systems running Windows 95 98 2000 XP 2003 or any other PNP compliant operating system should set the CMOS option to OS Systems running under DOS Windows NT Windows 3 1 or any other non PNP compliant operating system should set the PNP CMOS option to BIOS or Motherboard Save the option and continue booting the system Most computers should auto detect the card depending on the operating system and automatically finish installing the drivers Run PClfind exe to complete installing the card into the registry for Windows only and to determine
12. ging 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 appl
13. gned To determine the base address that has been assigned run the PCIFind EXE utility program provided This utility will display a list of all of the cards detected on the PCI bus the addresses assigned to each function on each of the cards and the respective IRQs if any allotted Alternatively some operating systems Windows 95 98 2000 can be queried to determine which resources were assigned In these operating systems you can use either PCIFind DOS PCINT Windows95 98 NT or the Device Manager utility from the System Properties Applet of the control panel The card is installed in the Data Acquisition class of the Device Manager list Selecting the card clicking Properties and then selecting the Resources Tab will display a list of the resources allocated to the card PCIFind uses the Vendor ID and Device ID to search for your card then reads the base address and IRQ If you want to determine the base address and IRQ yourself use the following information The Vendor ID for the card is 494F ASCII for IO The Device ID for the card is 1059h Chapter 5 Programming Sample Programs There are sample programs provided with the card in C Pascal QuickBASIC and several Windows languages DOS samples are located in the DOS directory and Windows samples are located in the WIN32 directory Windows Programming The card installs into Windows as COM ports Thus the Windows standard API functions can be used In particula
14. ications 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 it s timing to the baud rate of the data Note Thanks to the automatic control feature the card is ideal for use in WIN95 98 NT applications Specifications Communications Interface I O Connection Serial Ports Character length Parity Stop Interval Serial Data Rates Address Receiver Input Sensitivity Common Mode Rejection 9 pin D sub connectors 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 5 6 7 or 8 bits Even odd or none 1 1 5 or 2 bits 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 Continuou
15. r gt CreateFile and CloseHandle for opening and closing a port gt SetupComm SetCommTimeouts GetCommState and SetCommsState to set and change a port s settings gt ReadFile and WriteFile for accessing a port See the documentation for your chosen language for details Under DOS the process is very different The remainder of this chapter describes DOS programming Initialization Initializing the chip requires knowledge of the UART s register set The first step is to set the baud rate divisor You do this by first setting the DLAB Divisor Latch Access Bit high This bit is Bit 7 at Base Address 3 In C code the call would be outportb BASEADDR 3 0x80 You then load the divisor into Base Address 0 low byte and Base Address 1 high byte The following equation defines the relationship between baud rate and divisor desired baud rate UART Clock Frequency 32 divisor On the card the UART clock frequency is 1 8432 MHz Below is a table for the popular divisor frequencies When the BAUD jumper is in the X1 position the UART clock frequency is 1 8432MHz When the jumper is in the X4 position the clock frequency is 7 3728 MHz The following table lists popular divisor frequencies Note that there are two columns to consider depending on the position of the BAUD jumper Baud Rate Divisor x1 Divisor x4 Max Diff Cable Length 460800 1 550 ft
16. rges caused by modifications or additions to Portwell equipment not approved in writing by Portwell or if in Portwell 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 Portwell Table of Contents Chapter 1 Introduction i oasis 5 SPECICATION ua aden ca tai diia dia ia ae Sia 6 Figure 1 1 Block Diagram Only one serial channel shown 7 Chapter 2 Installation cordialidad 8 Chapter 3 Option Selection ue oco limitada dardo 10 Figure 3 1 Simplified Termination Schematic aaa aaa aaa aaa aaa 10 Figure 3 2 Option Selection Map iiss za kk EC Ea day z HEH daria wda a licita 12 Chapter 4 Address Selection e misa ot o a z pened iii 13 Chapter 5 Program Ming sani estiradas 14 Chapter 6 Connector Pin Assignment e ana 18 Table 6 1 Connector Pin Assignments ana 18 Appendix A Application Considerations nn 19 Table A 1 Connections Between Two RS422 DeviCeS an 19 Table A 2 RS422 Specification Summary 20 Figure A 1 Typical RS485 Two Wire Multidrop Network nn 21 Chapter 1
17. ross a pair of wires A balanced line driver will produce a differential voltage from 2 to 6 volts across its output terminals A balanced line driver can also have an input enable signal that connects the driver to its output terminals If the enable signal is OFF the driver is disconnected from the transmission line This disconnected or disabled condition is usually referred to as the tristate condition and represents a high impedance RS485 drivers must have this control capability RS422 drivers may have this control but it is not always required A balanced differential line receiver senses the voltage state of the transmission line across the two signal input lines If the differential input voltage is greater than 200 mV the receiver will provide a specific logic state on its output If the differential voltage input is less than 200 mV the receiver will provide the opposite logic state on its output The maximum operating voltage range from 6V to 6V allows for voltage attenuation that can occur on long transmission cables A maximum common mode voltage rating of 7V provides good noise immunity from voltages induced on the twisted pair lines The signal ground line connection is necessary in order to keep the common mode voltage within that range The circuit may operate without the ground connection but might not be reliable me m e Driver Output Voltage unloaded Driver Output Voltage loaded LD and LDGND ESEE Driver
18. rtment Be prepared to give the unit model number serial number and a description of the failure symptom s We may suggest some simple tests to confirm the failure We will assign a Return Material Authorization RMA number 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 Portwell 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 Portwell option with no charge for labor or parts not excluded by warranty Warranty commences with equipment shipment Following Years Throughout your equipment s lifetime Portwell 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 Portwell Equipment provided but not manufactured by Portwell 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 Portwell is limited to replacing repairing or issuing credit at Portwell discretion for any products which are proved to be defective during the warranty period In no case is Portwell liable for consequential or special damage arriving from use or misuse of our product The customer is responsible for all cha
19. sly mappable within 0000 to FFFF hex range of PCI bus addresses Conforms to PCI Specification 2 1 200 mV differential input 12V to 7V Transmitter Output Drive Capability 60 mA with thermal shutdown Environmental e Operating Temperature Range 0 C to 60 C Storage temperature Range Humidity Power Required Size 50 C to 120 C 5 to 95 non condensing 5VDC at 125 mA typical 12VDC at 5 mA typical 12VDC at 5 mA typical 750 mW total power consumption 7 8 long 198 mm by 3 9 99 mm OSCILLATOR PCI Q 2 m O a o LLI a O O INTERFACE TRANSCEIVER CHIP AUTO RTS CIRCUITRY Figure 1 1 Block Diagram Only one serial channel shown Chapter 2 Installation A printed Quick Start Guide QSG is packed with the card for your convenience If you ve already performed the steps from the QSG you may find this chapter to be redundant and may skip forward to begin developing your application The software provided with this card is on CD and must be installed onto your hard disk prior to use To do this perform the following steps as 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 then configure the card according to your requirements and protocol RS 232 RS 422 RS 485 4 wire 485 etc Our Windows b
20. ss REG_DWORD OxFF90 Interrupt REG_WORD 5 Interrupt REG_DWORD 5 DosDevices REG_SZ COM3 DosDevices REG SZ COM5 InterruptStatus REG_DWORD OxFFF8 InterruptStatus REG_DWORD OxFFF8 Portlndex REG_DWORD 1 PortIndex REG_DWORD 3 Serial3 Subkey Serial5 Subkey PortAddress REG DWORD OxFFEO PortAddress REG_DWORD OxFF80 Interrupt REG_DWORD 5 Interrupt REG_DWORD 5 DosDevices REG_SZ COM4 Dos Devices REG_SZ COM6 InterruptStatus REG_DWORD OxFFF8 InterruptStatus REG_DWORD OxFFF8 Portlndex REG DWORD 2 PortIndex REG_DWORD 4 As this example shows the Interrupt Status Register which indicates which port s caused an IRQ is located at COM A Base Address 8 Ga gt COMC COM D COMA E a a a E m CLKX4 lt mn 2 gt gt 9066 0000 o lt a l o m a m COM B Figure 3 2 Option Selection Map 3 9 Chapter 4 Address Selection The card uses 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 This means that the BIOS or Operating System determines the resources assigned to PCI cards rather than you selecting those resources with switches or jumpers As a result you cannot set or change the card s base address You can only determine what the system has assi
21. wo 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 Divisor Table on page 5 1 of the manual Interrupts Please note that in WindowsNT changes must be made to the system registry to support IRQ sharing The following is excerpted from Controlling Multiport Serial I O Cards provided by Microsoft in the MSDN library documentid mk Qivt nt40res D15 S55FC HTM also available in the WindowsNT Resource Kit The Microsoft serial driver can be used to control many dumb multiport serial cards Dumb indicates that the control includes no on board processor Each port of a multiport card has a separate subkey under the HKLM CurrentControlSet Services Serial subkey in the registry In each of these subkeys you must add values for DosDevices Interrupt InterruptStatus PortAddress and Portlndex because these are not detected by the Hardware Recognizer For descriptions and ranges for these values see Regentry hip the Registry help file on the WindowsNT Workstation Resource Kit CD For example if you have a four port card configured to use address OxFFFO with an interrupt of 05 the values in the Registry are assuming that every port is configured to use the same IRQ and that the addresses are configured to be consecutive and contiguous Serial2 Subkey Serial4 Subkey PortAddress REG DWORD OxFFFO PortAddre
Download Pdf Manuals
Related Search
Related Contents
2014-02-20-Fiche technique TE DRS-M Samsung YP-T10A, 4Gb Fujitsu LIFEBOOK T730 TrigMic Gen2 User Manual EN BA LC3000 Version 5 M500GTの組立説明書(PDF形式2.7MB) Série InverterFlex® Copyright © All rights reserved.
Failed to retrieve file