Contec F&eIT Series User Manual

Isolated rs-422a/485 1ch communication module
Hide thumbs Also See for F&eIT Series:

Advertisement

Quick Links

F&eIT Series
Isolated RS-422A/485 1ch
Communication Module
COM-1PD(FIT)GY
User's Manual
CONTEC CO.,LTD.

Advertisement

Table of Contents
loading

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...
  • Page 3: Copyright

    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.
  • Page 4: Table Of Contents

    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.........................
  • Page 6: Before Using The Product

    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].
  • Page 7: Customer Support

    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.
  • Page 8: Safety Precautions

    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.
  • Page 9: Handling Precautions

    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.
  • Page 11: Inspection

    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...
  • Page 12: Module Nomenclature And Settings

    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...
  • Page 13: Setup Method

    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.
  • Page 14: Setting Transmission Mode

    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.
  • Page 15: Setting Of Terminator

    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Ω...
  • Page 16: Led Indicator

    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...
  • Page 18: Connecting To An External Device

    Connector used - DELC-J9SAF-20L9 (Female Connector type) (mfd.by JAE) equivalent Applicable - 17JE-23090-02(D8C) (Male Connector type) (mfd.by DDK) - CN5-D9M(Male Connector type) (mfd.by CONTEC) COM-1PD Figure 3.1. Connecting an interface connector and connectors that can be used Transmit Data- TxD-...
  • Page 19: Types Of Cable And Example Connections

    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 -).
  • Page 20: Functions

    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.
  • Page 21: Setting The Baud Rate

    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...
  • Page 23: Automatic Rts Control Functions

    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.
  • Page 24: Using The Module

    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.
  • Page 25: Operating Under Cpu-Sb303-Fit

    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...
  • Page 28: Details On I/O Ports And Registers

    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.
  • Page 32: Interrupt Vector Registers

    5. Using the Module Interrupt Vector Registers Output port D6 - D2 Starting I/O address (Reserved) +1Fh Clock selection (see "Setting a Baud Rate") 00: Clock 0 mode (1.8432MHz) 01: Clock 1 mode (3.6864MHz) 10: Clock 2 mode (7.3728MHz) 11: Clock 3 mode (14.7456MHz) Fixed at "0"...
  • Page 33: Using An Interrupt

    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).
  • Page 34: Examples

    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.
  • Page 35: Compatible Mode

    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.
  • Page 37 5. Using the Module for(j = 0; j < NUM; j++) { printf(" CH0:%02x -> CH1:%02x ", j, rbuf[1][j]); if(rbuf[1][j] != j) printf("Verify Error \n"); /* verify data */ else printf("\n"); printf("\n"); for(j = 0; j < NUM; j++) { /* send CH1 to CH0 */ while( !(inp( ADR[1]+0x5 ) &...
  • Page 38: Enhanced Mode

    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 ) &...
  • Page 42: System Reference

    6. System Reference 6. System Reference Block Diagram Interface Connector CH0 Receiver Driver UART Device ID XR16C2850 Compatible Control Circuit Stack Connector Figure 6.1. Block Diagram COM-1PD(FIT)GY...
  • Page 43: Equivalence Circuit

    6. System Reference Equivalence Circuit SP491 TxD, RTS 100Ω 47kΩ 6.2kΩ 100Ω RxD, CTS 6.2kΩ 47kΩ Figure 6.2. Circuitry Diagrams RS-422A/485 in Full Duplex SP491 TxD, RxD 47k Ω 6.2k Ω 100 Ω 6.2k Ω 47k Ω Figure 6.3. Circuitry Diagrams RS-422A/485 in Half Duplex COM-1PD(FIT)GY...
  • Page 44: Specification

    6. System Reference Specification Table 6.1. Specification Item Specification Number of channels Interface type RS-422A/RS-485 Isolation Bus Isolation Isolation voltage 1000VDC Transfer method Asynchronous serial transfer (Full/Half duplex) Baud rate 2 - 921,600bps *1 *2 Data length 5, 6, 7, 8 bits 1, 1.5, 2 stop bits *1 Parity check Even, Odd, Non-parity *1...
  • Page 45: External Dimensions

    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...

This manual is also suitable for:

Com-1pd(fit)gy

Table of Contents