You are on page 1of 6

Multiport Serial Board Solutions

RS-232 Serial Communication Tutorial

RS-232 Serial Communication Tutorial


The most common and easy-to-use serial communication interface
RS-232 is a straightforward, universal, and commonly implemented serial interface. Despite its limited 15 m transmission distance, its low cost and easy wiring features make RS-232 the first choice for many applications. RS-232 establishes two-way (full-duplex) communications, with signals represented by voltage levels measured with respect to a system common ground (power/logic ground). The idle state (MARK) is negative with respect to the common ground, and the active state (SPACE) is positive with respect to common ground.

RS-232 Data Format


Start bit: Always 1 Data bits: 5, 6, 7, or 8 bits Parity: None, Odd, Even, Space, Mark Stop bit: 1, 1.5 (Data bits = 5), or 2 bits

RS-232 Specs
Standard Feature Mode of Operation Single Ended Drivers per Line 1 Receivers per Line 1 Max. Cable Length 50 feet Max. Data Rate

EIA RS-232

Point to point

20 Kbps

RS-232 Signal Definition


The standard output signal level of RS-232 usually varies between +12V and -12V, with a dead area between +3V and -3V designed to absorb line noise. The TTL signal from the UART is between 0 and 5 volts, but after being transformed by the RS-232 transceiver, the signal voltage is changed to +12V to -12V. TxD RxD RTS CTS DTR DSR DCD GND Transmit Data Receive Data Request to Send Clear to Send Data Terminal Ready Data Set Ready Data Carrier Detect Ground

Captec Ltd Sirius House, Peel Street, Southampton SO14 5QT, UK Tel: 44 (0)23 80571177 sales@captec.co.uk www.captec.ws Captec GmbH Karlsruher Strasse 11/1, D-70771, Leinf.-Echterdingen, Germany Tel: 49 (0)711 22063000 sales@captec-de.com www.captec-gmbh.de

Total Solution for Industrial Device Networking

RS-232 Serial Communication Tutorial

Flow Control
H/W Flow Control
RTS and CTS signals are often used for H/W flow control. When a station is ready to receive, it raises the RTS signal to request transmit signals from the remote side.

S/W Flow Control


Sending an XON/XOFF pattern is a typical way to control data flow. When a station is ready to receive, the S/W sends an XON pattern. If the Rx buffer is almost full, the S/W sends an XOFF pattern to ask the remote side not to transmit.

An Easy Programming ToolMOXA PComm Library


Software developers are often confused by Microsofts complex Win32 COMM API, used to develop serial comm applications under Windows XP, Windows 2000, Windows NT, and Windows 95/98/ME. The confusion stems from the fact that Win32 COMM API is a general purpose utility, with very complex syntax. MOXA PComm Pro offers you a better solution.

Main Features
50 easy-to-use API Functions Supports VB, C/C++, Delphi Interface Compatible with Win32 Comm API Superior Troubleshooting Utilities Supports Z/Y/XModem, Kermit, and ASCII protocols

Performance Analyzer

Data Scope

Captec Ltd Sirius House, Peel Street, Southampton SO14 5QT, UK Tel: 44 (0)23 80571177 sales@captec.co.uk www.captec.ws Captec GmbH Karlsruher Strasse 11/1, D-70771, Leinf.-Echterdingen, Germany Tel: 49 (0)711 22063000 sales@captec-de.com www.captec-gmbh.de

Multiport Serial Board Solutions

RS-422/485 Serial Commuication Tutorial

RS-422/485 Serial Communication Tutorial


Whats Needed for Industrial Applications
Most devices used in todays industrial environments are designed for use with the RS-422/485 interface. This means that many users employ RS-422/485 serial communication boards in their PCs, allowing the PCs to connect to an industrial RS-422 or RS-485 network and transmit data over distances up to 1.2 km. The RS-422/485 standards overcome the transmission distance limitation by using a differential signal for transmitting data and control signals. In addition to distance and multi-drop issues for industrial applications, isolation, housing, wiring, power supply, and over-surge protection are also important issues.

RS-422
Differential Transmission
The RS-422 protocol greatly expands the practical possibilities of the serial bus. It provides a mechanism by which data can be transmitted over long distances (up to 4,000 feet) and at very high speeds (up to 10 Mbps). This is accomplished by using differential technology that splits each signal into two separate wires in opposite voltage states, making this type of wiring configuration well suited for noisy environments.
Standard Feature Mode of Operation Drivers per Line EIA RS-422A Full-duplex, Point to point Differential 1

Receivers per Line 10 Maximum Cable Length Maximum Data Rate 4000 feet 10 Mbps

RS-485
Multidrop Network
RS-485 is an updated version of RS-422 that is specifically designed to address the problem of communication between multiple devices on a single data line. It is a balanced transmission system with the ability to allow up to 32 devices to communicate using the same data line. This is achieved with tri-statable drivers that are usually controlled by a programmable handshake line to ensure that only one device acts as a driver at any given time.
Standard Feature Mode of Operation Drivers per Line EIA RS-485 Half-duplex, multi-drop Differential 32

Receivers per Line 32 Maximum Cable Length Maximum Data Rate 4000 feet 10 Mbps

Captec Ltd Sirius House, Peel Street, Southampton SO14 5QT, UK Tel: 44 (0)23 80571177 sales@captec.co.uk www.captec.ws Captec GmbH Karlsruher Strasse 11/1, D-70771, Leinf.-Echterdingen, Germany Tel: 49 (0)711 22063000 sales@captec-de.com www.captec-gmbh.de

Total Solution for Industrial Device Networking

RS-422/485 Serial Commuication Tutorial

Termination
Termination is used to match impedance of both receive and transmission nodes. When impedance is mismatched, the transmitted signal is not completely absorbed by the load and a portion is reflected back into the transmission line. If the transmission line and load impedance are equal, these signal reflections are eliminated. The value of resistor needed to match the characteristic impedance is specified by the cable manufacturer, with a commonly used value of 120 ohms.

ADDC(Automatic Data Direction Control)


Limitations:
*System must determine when to switch the transmitter on and off. *Only one node can switch on/off at any given time.

Traditional Solution:
Use the RTS signal to control the transmitter by software.

Advanced Method:
ADDC(Automatic Data Direction Control).

Benefit:
ADDCswitches the transmitter on and off very precisely by hardware, effectively simplifying the complexity of timing control by software.

Result:
The Industrial Multiport Communication Board uses embedded ADDC technology to automatically sense and control data direction instead of using RTS/CTS control, making the handshaking signal method obsolete.

Isolation: Eliminate Ground Loops!


A common problem in many industrial applications is ground loop currents that flow through the ground line when ground voltage levels differ between connected devices. To eliminate this problem, Moxas Industrial boards and full function converters are available with Optical Isolation up to 2000V.

Industrial Wiring Peripheral


* Terminal Block * DIN-Rail Mounting

Five questions you need to ask about RS-422/485 selection:


1. What is the system configuration? (2/4-wire RS-422/485) 2. Are Isolation or Surge Protection available? 3. What value of termination resistors are used? 4. Is the resistor setup easily modified? 5. What baud rate, or range of baud rates, are supported?

TB-F9

TB-M9

Captec Ltd Sirius House, Peel Street, Southampton SO14 5QT, UK Tel: 44 (0)23 80571177 sales@captec.co.uk www.captec.ws Captec GmbH Karlsruher Strasse 11/1, D-70771, Leinf.-Echterdingen, Germany Tel: 49 (0)711 22063000 sales@captec-de.com www.captec-gmbh.de

Multiport Serial Board Solutions

RS-422/485 Serial Commuication Tutorial

Moxa RS-422/485 Solutions


Industrial Board Selection Guide Supported OS Drivers
MOXAs industrial COM port driver not only supports all major operating systems, but also the following dedicated operating systems for customers special needs. DOS (all Industrial Boards) OS/2 (ISA) SCO XENIX (ISA) QNX4 (ISA) QNX 6.x (PCI) Linux

Industrial Board Comparison Chart


Model Bus No. of Ports I/O Controller Connector Type Interface Speed RS-485 Intelligence Parity Surge Protection Isolation Data Bits Stop Bits IRQ 2(9), 3, 4, 5, 7, 10 (Default), 11, 12, 15 I/O Address 0X0000-0xFFFF, Default: 0x 180 Operating Temp DB9 Male x 2 RS-422/485 50-921.6 Kbps ADDC None, Even, Odd, Space, Mark 5, 6, 7, 8 1, 1.5, 2 3, 4, 5, 6, 7, 9, 10, 11, 12, or 15 2(9), 3, 4, 5, 7, 10 (Default), 11, 12, 15 0X0000-0xFFFF, Default: 0x 180 0-55C Assigned by BIOS Assigned by BIOS CI-132 CI-132I ISA 2 16C550C DB37 Female (with Optional accessories to 4 DB9/DB25 Male Connectors) RS-232/422/485 CI-132IS CP-132 CP-132I CP-132S PCI CP-132IS CA-132 CA-132I CI-134 CI-134I ISA 4 CP-114 CP-114I CP-114S PCI CP-114IS PC/104

PC/104

Assigned by BIOS

Assigned by BIOS

Captec Ltd Sirius House, Peel Street, Southampton SO14 5QT, UK Tel: 44 (0)23 80571177 sales@captec.co.uk www.captec.ws Captec GmbH Karlsruher Strasse 11/1, D-70771, Leinf.-Echterdingen, Germany Tel: 49 (0)711 22063000 sales@captec-de.com www.captec-gmbh.de

Total Solution for Industrial Device Networking

RS-422/485 Serial Commuication Tutorial

RS-422/485 Wiring Topology


4-Wire Full Duplex (Point-to-Point)

RS-422

2-Wire Half Duplex (Point-to-Point)

RS-485

2-Wire Half Duplex (Multi-Drop)

RS-485

4-Wire Full Duplex (Multi-Drop)

RS-485

Captec Ltd Sirius House, Peel Street, Southampton SO14 5QT, UK Tel: 44 (0)23 80571177 sales@captec.co.uk www.captec.ws Captec GmbH Karlsruher Strasse 11/1, D-70771, Leinf.-Echterdingen, Germany Tel: 49 (0)711 22063000 sales@captec-de.com www.captec-gmbh.de

You might also like