Home
PC COIVI 2 PORT RS-422/RS
Contents
1. DATA B 280 IF A lt gt B THEN PRINT ERROR 290 IF A lt gt B THEN GOTO 310 300 NEXT 310 CLOSE 2 320 END 22 2 File Transfer Basic Version 10 REM 20 REM SERIAL DRIVER DEMO PROGRAM FOR BASIC LANGUAGE 30 REM 40 REM THIS PROGRAM WILL TRASMIT MESSAGES TO 50 REM REMOTE SITE THROUGH DEVICE DRIVER 60 READ A 70 OPEN O 1 A 80 FOR I 1 TO 10 90 READ M 100 PRINT 1 LINE I M 110 NEXT I 120 PRINT 41 130 CLOSE 81 140 PRINT DATA TRANSMITTED 150 END 155 REM THE DEVICE NAME IS COMI 160 DATA COMI 170 DATA SERIAL DRIVER DEMO PROGRAM FOR BASIC LANGUAGE 180 DATA THIS MESSAGE IS RECEIVED FROM REMOTE SITE 190 DATA THIS IS LINE 3 200 DATA TRANSMIT OK 210 DATA ABCDEFGHIJKLMNOPQRSTUVWXYZ 220 DATA abcdefghijklmnopqrstuvwxyz 230 DATA THIS DEVICE DRIVER IS VERY EASY TO USE 240 DATA SEE REFERENCE MANUAL FOR MORE INFORMATION 250 DATA COPYRIGHT BY DECISION COMPUTER 260 DATA GOOD LUCK 23 REM REM SERIAL DRIVER DEMO PROGRAM FOR BASIC LANGUAGE REM REM THIS PROGRAM WILL RECEIVE MESSAGES REM FROM REMOTE SITE COMPUTER READ A OPEN I 1 A INPUT 1 M IF M THEN 120 PRINT M GOTO 80 CLOSE 1 PRINT DATA RECEIVED END REM THE DEVICE IS COMI DATA COMI 24 7 2 Write Your Own Driver If you are going to set the port address thing other than standard COM ports you must write a driver by yourself or use PCCOM soft ware see sect
2. Send Clear to Send Data Set Ready DCD Data Terminal Ready Ring Indicator N N N N NA PN PP pp P FP p N NE N N NN N N P P PPP PP PPP PPP PR 17 6 1 RS 422 Cabling Information The signal assignments for a standard DB25 connector are shown as follows Ground Transmit Data Receive Data Request to Send Clear to Send Data Set Ready Ground Data Carrier Detect Data Terminal Ready Ring Indicator Transmit Data Receive Data Request to Send Clear to Send Data Set Ready Data Carrier Detect Data Terminal Ready Ring Indicator 1 2 3 4 5 6 7 8 9 18 6 2 RS422 Cabling Connections To connect RS422 ports to other DATA TERMINAL EQUIPMENT DTE devices we recommend the use of DTE to DTE configuration which is shown as follows HOST REMOTE PC RS422 PC RS422 19 6 3 RS485 Cabling Information The RS485 signal assignment is shown as follows rin Ground Transmit Data Receive Data Transmit Data Receive Data The RS485 communication jis based on cable sharing method which is connected as following Computer at site 1 Computer at site 2 TX RX TX RX TX RX TX RX Ground Ground 20 CHAPTER7 SOFTWARE PROGRAMMING It is easy to achieve communications under MS DOS by setting the RS422 RS485 board to 1 and COM2
3. standard COMI and COM2 communication statements are supported by most high level language such as BASIC PASCAL C etc In the following example we will intro duce users how to write an application pro gram In section 7 1 we will specify how to write high level language when the board is set to standard COM1 and COM2 Suppose your setting is not standard COM ports the sec tion 7 2 introduces the user how to write a driver Section 7 3 provides how to use SERIAL DRIVER to drive the RS422 RS485 board The PCCOM software is a powerful package for serial communication we will introduce it in section 7 4 7 1 Use Standard COM Ports Since BASIC language provides a buffer for communications in the follows we will demonstrate how to program under BASIC lan guage To start the communication task under BASIC the statement 21 OPEN COMn speed parity AS ID is used then you can use the file ID to send or receive data from communication port In the following we list send and receive programs which are written in the BASIC language 1 Loopback Test Basic Version 5 REM OPEN LOGICAL DEVICE 1 10 OPEN 41 1 25 CNT 0 30 FOR I amp H31 TO amp H80 40 CNT CNT 1 50 60 PRINT 1 A 100 NEXT I 110 PRINT CNT 180 CLOSE 1 190 FOR I 1 TO 1000 NEXT I 200 OPEN I 42 COM1 230 FOR I amp H31 TO amp H80 250 A CHR I 271 B INPUT 1 2 275 PRINT
4. to 4000 ft Under the RS422 mode RTS and CTS are used to provide communication flow control protocol Under the RS485 mode only trans mission and receive signal are used both drivers and receivers can be enabled or disabled by jumper setting or software This means the RS485 provides a multi point commu nication protocol The features of the RS422 RS485 adapter are Standard RS422 RS485 serial communication interface Maximum of 4000 ft transmission distance Up to 56K baud transmission speed I O address selectable Interrupt selectable RS485 driver and receiver selectable CHAPTER2 UNPACKING INFORMATION Your PC COM RS422 RS485 package should include the following items PC COM RS422 RS485 adapter User manual Warranty form CHAPTER3 SYSTEM REQUIREMENTS Before installing your PC COM RS422 RS485 adapter make sure that The host computer is an IBM PC XT PC AT PC 386 or compatible The seven jumpers are correctly configured to coincide with the operating system you are using The operating system you intend to use is capable of driving two serial ports CHAPTER4 HARDWARE INSTALLATION Your PC COM RS422 RS485 adapter is designed to be inserted in any available slot in your PC XT PC AT PC 386 or compatible In order to gain access to the expansion slots follow the steps listed below 1 Turn off all power to your computer and all peripheral devices before installing
5. your PC COM RS422 RS485 adapter 2 Remove the cover of the computer 3 Insert the preconfigured PC COM RS422 RS485 adapter into any available slot Make sure the adapter is firmly seated in the chosen slot 4 Replace the cover of the computer 5 Connect cables to DB25 connectors as required CHAPTER5 JUMPER SETTINGS 5 1 Introduction The seven jumpers on the PC COM RS422 RS485 adapter must be configured correctly in accordance with the operating system you are using JP1 JP2 JP3 JP5 JP6 JP7 Jumper 1 Select driver enable mode of channel 1 Jumper 2 Select driver enable mode of channel 2 Jumper 3 Select receiver enable mode of channel 1 Jumper 4 Select receiver enable mode of channel 2 Jumper 5 Selects which interrupt will be used in the range IRQ2 through IRQT Jumper 6 Select number of delay wait states Jumper 7 Determines the address of the UARTs I O address PC COM PS 422 485 1 0 Card Ci C2 A Uwe ue TIT2T3 585 R2 AA R3 U1 05 55 _ 75172 1 B 75173 1 R4 AA 16450 2 R5 AA C3 U4 EE 75173 1 123123 lt 741574 Pasa 1 Bas 92 IPI 2574 21 140 48 007 0 1 sg 75173 2 JP5 E PAL D 31 L 1 ipeo mm Beas On 21 JP4 JP7 31 5 2 Selection of Jumper Settings It is im
6. 4 0 port p2 7 1 7 2 Enable RX 1 4 0 for i 1 to 20 do begin repeat bi random 256 until bl lt gt b2 port p2 5 bl delay delaytime b2 port pl writeln b1 4 b2 12 end readkey begin main clrscr randomize delaytime 100 write Enter delay time 1 1000 ms readin delaytime test writeln Done end 27 7 3 Under Serial Driver The SERTAL DRIVER can be used to drive your RS422 or RS485 port To drive RS485 or RS422 you need not give the interrupt vector address and active status because the RS422 RS485 board does not support an inter rupt vector It is easily to control the RS422 mode under the SERIAL DRIVER However if you set the RS485 mode you must take over the RTS signal or control register MCR byte 1 of I O control can be used to set RTS to enable the driver see SERIAL DRIVER chapter 6 TO enable the driver by the control register please use OUT 5 7 statement 7 4 Under PCCOM Software Package The PCCOM software can be used to drive your RS422 or RS485 port to drive RS485 or RS422 you need not give interrupt vector address and active status because the RS422 RS485 board does not support an inter rupt vector It is easy to control the RS422 mode under PCCOM However if you set the RS485 mode you must take over the RTS signal or control register The OUT BASE 4 stateme
7. PC COM 2 PORT RS 422 RS 485 CARD USER MANUAL zrfyrtrr EY ORGS ON NO P TER PC COM 2 PORT RS422 485 ADAPTER USER MANUAL CONTENTS CHAPTER 1 INTRODUCTION 1 CHAPTER 2 UNPACKING INFORMATION 3 CHAPTER 3 SYSTEM REQUIREMENTS 4 CHAPTER 4 HARDWARE INSTALLATION 5 CHAPTER 5 JUMPER SETTINGS 6 CHAPTER 6 CABLING INFORMATION 16 CHAPTER 7 SOFTWARE PROGRAMMING 21 APPENDIX WARRANTY INFORMATION 29 Rev Date 1990 SEP 15 CHAPTER 1 INTRODUCTION The PC COM RS422 RS485 adapter provides two asynchronous serial communication ports which enables one computer to communicate with other computers via communication lines or to link the computer and serial peripheral devices such as serial printers plotters etc The PC COM RS422 RS485 board can be installed in any IBM PC XT PC AT PC 386 or hardware compatible system To accommodate a variety of operating systems seven jumpers permit maximum flexibility of configuration You may select which interrupt IRQ2 IRQ7 I O address you desire The PC COM RS422 RS485 adapter provides Signal drivers and receivers which can be set by software or hardware Since the adapter support differential communication lines it provides longer and more reliable communica tion quality than does RS232 The communica tion speed is up to 56K baud and the maximum transmission distance is up
8. ion 7 4 SERIAL DRIVER package see section 7 3 In the following we will demonstrate how to write a driver by your self To write your own driver the most important things are driver and receiver mode selection When the adapter is set to always enable mode the communication protocol is RS422 Please refer the data book for 8250 chip to programming 8250 registers under RS422 mode When you select the RS485 mode you may enable the driver for RTS or control regis ter We assume BASE 1A0 then 1 Enable RTS Turn on driver OUT BASE 4 3 Turn off driver OUT BASE 4 0 2 Enable control register Turn on driver OUT BASE 7 1 Turn off driver OUT BASE 7 0 25 The control register can be used to enable receiver Turn on receiver OUT BASE 7 2 Turn off receiver OUT 5 7 0 A statement such as OUT BASE 7 3 will turn on both driver and receiver The PASCAL program listed below can be used to test the send and receiver functions program RS_485_test_PROPGRAM uses ert const 8388 p2 var delaytime integer procedure init p n integer begin port p 3 80 port p J Lo n port p 1 Hi n port p 3 3 end 26 procedure test const baudl array 1 3 of integer baud2 array 1 3 of word var tx rx dir stat testloop baudindex i integer 1 2 byte c char begin init p1 96 init p2 96 96 12 2 1200 9600 57600 3 RTS Low port p2
9. is required c Enabled by bit 1 LSB of control register The address of control register is base address plus 7 When the bit is set to 1 the receiver is enabled otherwise when the bit is set to 0 the receiver is turned off 14 The receiver mode selection of channel 1 is shown below JP3 2 1 Short JP3 1 receiver always enable Short JP3 2 enabled by bit 1 of control register The receiver mode selection of channel 2 is shown below JP4 2 m Short JP4 1 receiver always enable Short JP4 2 enabled by bit 1 of control register 15 CHAPTER6 CABLING INFORMATION Two special cables with a DB37 connector are provided in the package This cable converts the signals from the DB37 connector into two standard DB25 connectors 37 Pin D Sheil 25 Pin O Shel Connector Connecior Pin Locations for Male Connectors 16 1 Ground 2 Transmit Data 3 Receive Data 4 Request to Send 5 Clear to Send 6 Data Set Ready 7 Ground 8 DCD 9 Data Terminal Ready Ring Indicator Transmit Data Receive Data Request to Send Clear to Send Data Set Ready Ground DCD Data Terminal Ready Ring Indicator Transmit Data Receive Data Request to Send Clear to Send Data Set Ready DCD Data Terminal Ready Ring Indicator Ground Ground Transmit Data Receive Data Request to
10. not liable to the purchaser for any damages or losses of any kind through the use of or inability to use the DECISION product DECISION reserves the right to determine what constitutes warranty repair or replacement Return Authorization It is necessary that any returned goods are clearly marked with an RA number that has been issued by DECISION Goods returned without this authorization will not be attended to 30
11. nt can be used to set RTS to enable the driver TO enable the driver by the control register please use OUT BASE47 statement 28 APPENDIX WARRANTY INFORMATION DECISTON warrants that for a period of one year from the date of purchase unless otherwise specified in the warranty card that the goods supplied will perform according to the specifications defined in the user manual Furthermore that the DECISION product will be supplied free from defects in materials and workmanship and be fully functional under normal usage In the event of the failure of a DECISION product within the specified warranty period DECISION will at its option replace or repair the item at no additional charge This limited warranty does not cover damage resulting from incorrect use electrical interference accident or modification of the product All goods returned for warranty repair must have the serial number intact Goods without serial numbers attached will not be covered by the warranty Transportation costs for goods returned must be paid by the purchaser Repaired goods will be dispatched at the expense of DECISION 29 To ensure that your DECISION product is covered by the warranty provisions it is necessary that you return the Warranty card Under this Limited Warranty DECISION s obligations will be limited to repair or replacement only of goods found to be defective as specified above during the warranty period DECISION is
12. portant to refer to the user manual supplied with your operating system to determine the correct configuration IMPORTANT CARE MUST BE TAKEN IN SELECTING THE CONFIGURATION OF JUMPERS TO ENSURE YOU DO NOT DUPLICATE SETTINGS OF OTHER EQUIPMENT ALREADY INSTALLED YOUR COMPUTER DUPLICATION OF SETTINGS WILL RESULT IN A MALFUNCTION OF ONE OR BOTH DEVICES Please refer to the following settings for each jumper If you are installing more than one board do not duplicate jumper settings for any parameter 1 Port Address The JP7 is used to select the I O port address The I O address mapping of each port is shown below 2 1 2 4 Model JP7 Mode2 JP7 1 2 1 2 Modes JP7 B Mode4 JP7 EN Factory setting is ln mode 1 which are standard COM1 and COM2 2 Interrupt Setting JP5 is used to select the interrupt level To short the R and C side means to select interrupt the level of channel 1 shorting the L and C side selects the inter rupt level of channel 2 JPS amp S L PORT 2 5 H 9 C R PORT1 OWH P OWH wm OWH In a standard PC system COM1 3F8 3FF and COM2 2F8 2FF generate interrupts on IRQ4 and IRQ3 respectively Factory settings of this jumper are IRQ4 and IRQ3 which corresponds to COM1 and COM2 10 3 Delay Wait States The number of delay wait states are selected by JP6 Shorting position 1 sets no wait CPU clock sho
13. rting position 2 sets wait 1 CPU clock etc JP6 1 2 11 4 Driver Mode Selection JP1 and JP2 are used to select driver enable modes of channel 1 and 2 respectively There are three enable modes a Always enable This is required to set the always enable mode for RS422 applications b Enabled by RTS signal When the signal is 1 the driver is enabled otherwise when the signal is 0 the driver is disabled To turn on the driver for RTS you only need to output 3 to the address of base address plus 4 To turn off the driver for RTS you need to output 0 to the address of base address plus 4 c Enabled by bit O LSB of control register The address of control register is base address plus 7 When the bit is set to 1 it enables the driver otherwise when the bit is set to O it turns off the driver 12 The driver mode selection of channel 1 is shown below JP1 1 2 3 Short JP1 1 driver always enabled Short JP1 2 enabled by RTS Short JP1 3 enabled by bit O of control register The driver mode selection of channel 2 is shown below Short JP2 1 driver always enable Short JP2 2 enabled by RTS Short JP2 3 enabled by bit 0 of control register 13 5 Receiver Mode Selection JP3 and JP4 are used to select the receiver enable mode of channel 1 and 2 re spectively There are two enable modes a Always enable For RS422 applications setting to always enable
Download Pdf Manuals
Related Search
Related Contents
インプレス - モルテン Bedienungsanleitung Kältemittelleckagen OM, 128R, 952711949, 2012-05, EN, FR, ES COSC 445 Compiler Project #2 Distributed: 9 March コチラ VAC-70 User manual - Stoltronic Protocolo Força de segurança Data Acquisition Unit User Manual Copyright © All rights reserved.
Failed to retrieve file