Conprosys digital output module 16ch sink/source type (33 pages)
Summary of Contents for Contec F&eIT Series
Page 1
F&eIT Series Isolated RS-422A/485 1ch Communication Module COM-1PD(FIT)GY User’s Manual CONTEC CO.,LTD.
Page 2
Check Your Package Thank you for purchasing the CONTEC product. The product consists of the items listed below. Check, with the following list, that your package is complete. If you discover damaged or missing items, contact your retailer. Product Configuration List - Module[COM-1PD(FIT)GY] …1...
No part of this document may be copied or reproduced in any form by any means without prior written consent of CONTEC CO., LTD. CONTEC CO., LTD. makes no commitment to update or keep current the information contained in this document. The information in this document is subject to change without notice.
Table of Contents Check Your Package..........................i Copyright ............................ii Trademarks ............................ii Table of Contents ..........................iii BEFORE USING THE PRODUCT About the Module ..........................1 Features............................1 Customer Support ..........................2 Web Site............................2 Limited One-Year Warranty....................... 2 How to Obtain Service ........................
Page 5
FUNCTIONS Communication Function ......................... 15 Serial Data Transmission......................15 RS-422A/485 Control Lines ...................... 15 Send and Receive Data Buffers ....................15 Setting the Baud Rate ........................ 16 Automatic RTS Control Functions .................... 18 Other Functions ..........................18 Bus Isolation ..........................18 Surge Protection.........................
1. Before Using the Product 1. Before Using the Product This chapter provides information you should know before using the product. About the Module The COM-1PD(FIT)GY performs serial communication with an external device in compliance with RS-422A/485, capable of serving as COM3 or COM4 of an F&eIT series microcontroller unit. The module can also serve as an expansion COM port for a media converter [RP-COM(FIT)H, RP-COM(FIT)H-AF, or FX-DS540-COM2].
You can download updated driver software and differential files as well as sample programs available in several languages. Note! For product information Contact your retailer if you have any technical question about a CONTEC product or need its price, delivery time, or estimate information. Limited One-Year Warranty CONTEC products are warranted by CONTEC CO., LTD.
1. Before Using the Product Safety Precautions Understand the following definitions and precautions to use the product safely. Safety Information This document provides safety information using the following symbols to prevent accidents resulting in injury or death and the destruction of equipment and resources. Understand the meanings of these labels to operate the equipment safely.
CAUTION Take the following precautions when handling this module. Do not modify the module. CONTEC will bear no responsibility for any problems, etc., resulting from modifying this module. Do not use or store the equipment in a hot or cold place, or in a place that is subject to severe temperature changes.
Page 10
1. Before Using the Product FCC PART 15 Class A Notice NOTE This equipment has been tested and found to comply with the limits for a Class A digital device, pursuant to part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference when the equipment is operated in commercial environment.
1. Before Using the Product Environment Use this product in the following environment. If used in an unauthorized environment, the module may overheat, malfunction, or cause a failure. Operating temperature 0 - 50°C Humidity 10 - 90%RH (No condensation) Corrosive gases None Floating dust particles Not to be excessive...
2. Module Nomenclature and Settings 2. Module Nomenclature and Settings Nomenclature of Module Components Figure 2.1. shows the names of module components. In the figure, the indicated switch settings represent factory settings. LED Indicator Device ID Device TERM Transmission mode terminators MODE Interface connector COM-1PD...
2. Module Nomenclature and Settings Setup Method A device ID can be set by turning the rotary switch on the device face. To set a device ID, turn the switch knob. Device Factory settings: (Device ID = 0) Figure 2.2. Setting a Device ID Table 2.1.
2. Module Nomenclature and Settings Setting Transmission Mode The data transfer mode setting switch is used to switch between full duplex and half duplex and to specify whether to use RTS/CTS in full duplex mode. Set the appropriate data transfer mode for the device with which you are communicating.
2. Module Nomenclature and Settings Setting of Terminator The terminator setting switch controls whether or not a terminator is inserted into each signal line. Set the terminators on or off in accordance with the devices with which you are communicating. The terminators on the module are 100Ω...
2. Module Nomenclature and Settings The figure below shows the circuit associated with the data transfer mode setting switch and terminator setting switch. Terminator 9 10 Terminator 1/2W 100Ω 162850 Data transmission or Equivalent mode TxD+ SOUT TxD- RxD+ RxD- CTS+ CTS- RTS+...
Page 17
2. Module Nomenclature and Settings COM-1PD(FIT)GY...
3. Connecting to an External Device Types of Cable and Example Connections The figures below show examples of how to connect the cable for the module. The RS-422A/485 interface works based on a differential signal whereby the signal is carried by the potential difference between two lines (+ and -).
4. Functions 4. Functions This section describes the functions of the module. Communication Function Serial Data Transmission Sends and receives data in accordance with the RS-422A/485 standard. The baud rate can be set independently in the range 2 - 921,600bps by software. RS-422A/485 Control Lines The module include the RTS+, RTS-, CTS+, and CTS- control lines.
4. Functions Setting the Baud Rate The output baud rate can be set by setting the appropriate value to the Baud Rate Generator register. The available setting range depends on which clock mode is used. Clock 3 mode: 15 - 921,600bps Clock 2 mode: 8 - 460,800bps Clock 1 mode: 4 - 230,400bps Clock 0 mode: 2 - 115,200bps...
Page 22
4. Functions Refer to the following baud rate setting examples. Baud rates other than those listed below can also be set if they produce a valid setting value in the equation described above. Table 4.1. Baud Rate Generator Programming Table Clock 0 mode Clock 1 mode Clock 2 mode...
4. Functions Automatic RTS Control Functions This function applies to half duplex mode communications. As half duplex means that the same line is used for sending and receiving, the RTS and CTS signals are used to switch between sending and receiving. Normally, RTS is set by writing to the corresponding register bit, but on this module it is controlled by hardware.
Compatible and Enhanced Modes The COM-1PD(FIT)GY can operate in two modes: the compatible mode, in which the COM-1PD(FIT)GY, when connected to CONTEC’s microcontroller unit, acts as a standard serial port; and the enhanced mode, in which the COM-1PD(FIT)GY operates under CONTEC’s unique control method.
Please use it excluding Device ID No. 8, 9, A, B when using in the Windows environment. Operating under CPU-SB303-FIT When using the module under CONTEC’s microcontroller unit CPU-SB303-FIT, the OS must be set to recognize the I/O address and interrupt level used by the COM-1PD(FIT)GY.
Page 26
(2) For Compatible mode, double click on the [Ports (COM & LPT)] folder. For Enhanced mode, double click on the [Multi-function adapters] folder. (3) Double click on the [CONTEC CO., LTD. - COM-1PD(FIT)GY] or [COM*] folder to display the properties screen.
Page 27
5. Using the Module I/O Ports and Registers The module uses the XR16C2850 (Exar Corporation) upward compatible with the 16550 UART. For details on the internal registers of the XR16C2850 and its control, refer to the XR16C2850 data sheet. In enhanced mode, “starting I/O address + 1Fh” is used as an interrupt vector register. I/O Ports Starting I/O address...
5. Using the Module Details on I/O Ports and Registers The XR16C2850’s internal registers are port-mapped differently depending on the value set in the Line Control Register (LCR). The General Registers are enabled at startup or with LCR Bit 7 = 0 and LCR = other than 0xBFh. The Baud Rate Registers are enabled with LCR Bit 7 = 1.
Page 29
5. Using the Module Input port 2 (Baud Rate Registers) Starting I/O address LSB of Divisor Latch (DLL) Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 MSB of Divisor Latch (DLM) Bit 15 Bit 14 Bit 13 Bit 12...
Page 30
5. Using the Module Output port 1(General Registers) Starting I/O address Transmit Holding Register (THR) Data Bit 7 Data Bit 6 Data Bit 5 Data Bit 4 Data Bit 3 Data Bit 2 Data Bit 1 Data Bit 0 Interrupt Enable Register (IER) Xoff Sleep MODEM...
Page 31
5. Using the Module Output port 3(Enhanced Registers) Starting I/O address FIFO Level Counter Trig/FC Trig/FC Trig/FC Trig/FC Trig/FC Trig/FC Trig/FC Trig/FC Feature Control Register (FCTR) Rx/Tx SCPAD Trig Trig RS485 IrRx -RTS -RTS Mode Swap Bit 1 Bit 0 Auto Inv.
5. Using the Module Using an Interrupt Compatible Mode When the Module is operated in the compatible mode, channel CH0 is assigned to standard I/O addresses COM3 and COM4, respectively. The interrupt levels will be IRQ5 for COM3 and IRQ7 for COM4. Enhanced Mode When the Module is being used in enhanced mode, interrupt generation can be checked with the interrupt vector register (IVR).
5. Using the Module Examples Following is a COM-1PD(FIT)GY sample program. The sample program executes transmission and reception between two COM-1PD(FIT)GY units. To connect RTS and CTS to an external device in full-duplex mode, use a connection cable as illustrated below.
5. Using the Module Compatible Mode Flowchart Start Set Baud Rate CH0 LSR D5 Generator Bit = 1 Set transmission Send CH0 data format WAIT time CH1 LSR D0 Bit = 1 Set modem control output Receive CH1 data Line status register dummy READ Final data RECEIVE register...
Page 36
5. Using the Module Sample Program /*=========================================================================== Sample program 1 -- UNIT0 <=> UNIT1 Loop Test -- UNIT No. DEVICE ID: Mode: Compatible Mode Channel 0: 03E8H (COM3) 02E8H (COM4) Baud Rate: 115,200 bps Interrupt: ========================================================================== */ #include <stdio.h> #include <conio.h> /* ----- Constant ---------------------------------------------------------- */ #define /* no.
5. Using the Module Enhanced Mode Flowchart Interrupt Start processing Read interrupt Initialize vector register Change interrupt CH0 IVR D0 vectors Bit = 0 CH0 LSR D5 Bit = 1 Count number of interrupts Send CH0 data Read CH0 data Show an CH0 LSR D5 interrupt count...
Page 39
5. Using the Module Sample Program =========================================================================== Sample program 2 -- UNIT0 <=> UNIT1 Loop Test -- UNIT No. DEVICE ID: Mode: Enhanced Mode Channel 0: 1A0H 2A0H Baud Rate: 115,200 bps Interrupt: IRQ5 IRQ7 ==========================================================================*/ #include <stdio.h> #include <conio.h> #include <dos.h>...
Page 40
5. Using the Module outp( ADR[i]+0x4, 0x3 ); /* MODEM Control Register (DTR . RTS) */ dummy = inp( ADR[i]+0x5 ); /* Line Status Register (Dummy Read) */ dummy = inp( ADR[i]+0x0 ); /* Receiver Buffer Register (Dummy Read) */ dummy = inp( ADR[i]+0x2 );...
Page 41
5. Using the Module _disable(); /* disable */ outp( 0x20, 0x20 ); /* EOI */ /* ------ main ------------------------------------------------------------- */ void main( void ) unsigned int i, j; Initialize(); /* initialize */ ChgVect(); /* change vector */ for(j = 0; j < NUM; j++) { /* send CH0 to CH1 */ while( !(inp( ADR[0]+0x5 ) &...
6. System Reference Table 6.2. Installation Environment Requirements Parameter Requirement description Operating temperature 0 - 50 ° C Storage temperature -10 - 60 ° C Humidity 10 - 90% (No condensation) Floating dust particles Not to be excessive Corrosive gases None External Dimensions (1.2)
Page 46
3-9-31, Himesato, Nishiyodogawa-ku, Osaka 555-0025, Japan Japanese http://www.contec.co.jp/ English http://www.contec.com/ Chinese http://www.contec.com.cn/ No part of this document may be copied or reproduced in any form by any means without prior written consent of CONTEC CO., LTD. [11122007] [12102003] Management No. A-46-812 [11132007_rev5] Parts No. LYDC894...