contents

Sunday, February 5, 2017

Characteristics of RS232,RS423,RS422,RS485

http://2.bp.blogspot.com/-juIIaK1H_uc/VgVhv0rhWBI/AAAAAAAABXk/YHOTHvvu92k/s1600/12.bmp

Introduction to Serial Communication
Technical Tutorial
  1. Introduction
The purpose of this application note is to attempt to describe the main elements in Serial Communication. This application note attempts to cover enough technical details of RS232, RS422 and RS485.

1.1. DCE and DTE Devices
DTE stands for Data Terminal Equipment, and DCE stands for Data Communications Equipment. These terms are used to indicate the pin-out for the connectors on a device and the direction of the signals on the pins. Your computer is a DTE device, while most other devices such as modem and other serial devices are usually DCE devices. RS-232 has been around as a standard for decades as an electrical interface between Data Terminal Equipment (DTE) and Data Circuit-Terminating Equipment (DCE) such as modems or DSUs. It appears under different incarnations such as RS-232C, RS-232D, V.24, V.28 or V.10. RS-232 is used for asynchronous data transfer as well as synchronous links such as SDLC, HDLC, Frame Relay and X.25

1.2. Synchronous data transfer
In program-to-program communication, synchronous communication requires that each end of an exchange of communication respond in turn without initiating a new communication. A typical activity that might use a synchronous protocol would be a transmission of files from one point to another. As each transmission is received, a response is returned indicating success or the need to resend.

1.3. Asynchronous data transfer
The term asynchronous is usually used to describe communications in which data can be transmitted intermittently rather than in a steady stream. For example, a telephone conversation is asynchronous because both parties can talk whenever they like. If the communication were synchronous, each party would be required to wait a specified interval before speaking. The difficulty with asynchronous communications is that the receiver must have a way to distinguish between valid data and noise. In computer communications, this is usually accomplished through a special start bit and stop bit at the beginning and end of each piece of data. For this reason, asynchronous communication is sometimes called start-stop transmission.

  1. RS232
RS-232 (Recommended standard-232) is a standard interface approved by the Electronic Industries Association (EIA) for connecting serial devices. In other words, RS-232 is a longestablished standard that describes the physical interface and protocol for relatively low-speed serial data communication between computers and related devices. An industry trade group, the Electronic Industries Association (EIA), defined it originally for teletypewriter devices. In 1987, the EIA released a new version of the standard and changed the name to EIA-232-D. Many people, however, still refer to the standard as RS-232C, or just RS- 232. RS-232 is the interface that your computer uses to talk to and exchange data with your modem and other serial devices. The serial ports on most computers use a subset of the RS-232C standard.

2.1. RS232 on DB9 (9-pin D-type connector)
There is a standardized pinout for RS-232 on a DB9 connector, as shown below
Pin Number Signal Description
1 DCD Data carrier detect
2 RxD Receive Data
3 TxD Transmit Data
4 DTR Data terminal ready
5 GND Signal ground
6 DSR Data set ready
7 RTS Ready to send
8 CTS Clear to send
9 RI Ring Indicator
25-pin D-type connector Pin assignment

2.2. RS232 on DB25 (25-pin D-type connector)
In DB-25 connector most of the pins are not needed for normal PC communications, and indeed, most new PCs are equipped with male D type connectors having only 9 pins. Using a 25- pin DB-25 or 9-pin DB-9 connector, its normal cable limitation of 50 feet can be extended to several hundred feet with high-quality cable. RS-232 defines the purpose and signal timing for each of the 25 lines; however, many applications use less than a dozen. There is a standardized pinout for RS-232 on a DB25 connector, as shown below.

Pin Number Signal Description
1 PG Protective ground
2 TD Transmitted data
3 RD Received data
4 RTS Request to send
5 CTS Clear to send
6 DSR Data set ready
7 SG Signal Ground
8 CD Carrier detect
9 + Voltage (testing)
10 - Voltage (testing)
11
12 SCD Secondary CD
13 SCS Secondary CTS
14 STD Secondary TD
15 TC Transmit Clock
16 SRD Secondary RD
17 RS Receiver clock
18 Ready to Send
19 SRS Secondary RTS
20 DTR Data Terminal Ready
21 SQD Signal Quality Detector
22 RI Ring Indicator
23 DRS Data rate select
24 XTC External Clock
25
25-pin D-type connector Pin assignment

2.3. RS232 on RJ-45
RJ-45 (Registered Jack-45) is an eight-wire connector used commonly to connect computers onto local-area networks (LAN), especially Ethernets. In other words, RJ-45 is a single-line jack for digital transmission over ordinary phone wire, either untwisted or twisted. The interface has eight pins or positions. For faster transmissions in which you're connecting to an Ethernet 10BASET network, you need to use twisted pair wire. RS232D, EIA/TIA - 561 standard is applied when connecting to or from a serial port with a 8 position Modular Jack (RJ45) though it is not widely used as such.

Pin No. Name Notes/Description
1 DSR/RI Data set Ready/ring indicator
2 DCD Data Carrier Detect
3 DTR Data Terminal Ready
4 SGND Signal Ground
5 RD Receive Data
6 TD Transmit Data
7 CTS Clear to Send
8 RTS Request to Send
RS232D standard for RS232 communication

2.4. Signal Description
TxD: - This pin carries data from the computer to the serial device
RXD: - This pin carries data from the serial device to the computer
DTR signals: - DTR is used by the computer to signal that it is ready to communicate with the
serial device like modem. In other words, DTR indicates to the Dataset (i.e., the modem or
DSU/CSU) that the DTE (computer) is ON.
DSR: - Similarly to DTR, Data set ready (DSR) is an indication from the Dataset that it is ON.
DCD: - Data Carrier Detect (DCD) indicates that carrier for the transmit data is ON.
RTS: - This pin is used to request clearance to send data to a modem
CTS: - This pin is used by the serial device to acknowledge the computer's RTS Signal. In most
situations, RTS and CTS are constantly on throughout the communication session. Clock signals (TC, RC, and XTC): - The clock signals are only used for synchronous communications. The modem or DSU extracts the clock from the data stream and provides a steady clock signal to the DTE. Note that the transmit and receive clock signals do not have to be the same, or even at the same baud rate.
CD: - CD stands for Carrier Detect. Carrier Detect is used by a modem to signal that it has a made a connection with another modem, or has detected a carrier tone. In other words, this is used by the modem to signal that a carrier signal has been received from a remote modem.
RI: - RI stands for Ring Indicator. A modem toggles(keystroke) the state of this line when an incoming call rings your phone. In other words, this is used by an auto answer modem to signal the receipt of a telephone ring signal The Carrier Detect (CD) and the Ring Indicator (RI) lines are only available in connections to a modem. Because most modems transmit status information to a PC when either a carrier signal is detected (i.e. when a connection is made to another modem) or when the line is ringing, these two lines are rarely used.

2.5. Limitations of RS-232
RS-232 has some serious shortcomings as an electrical interface. Firstly, the interface presupposes a common ground between the DTE and DCE. This is a reasonable assumption where a short cable connects a DTE and DCE in the same room, but with longer lines and connections between devices that may be on different electrical busses, this may not be true. We have seen some spectacular electrical events causes by "uncommon grounds". Secondly, a signal on a single line is impossible to screen effectively for noise. By screening the entire cable one can reduce the influence of outside noise, but internally generated noise remains a problem. As the baud rate and line length increase, the effect of capacitance between the cables introduces serious crosstalk until a point is reached where the data itself is unreadable. Using low capacitance cable can reduce crosstalk. Also, as it is the higher frequencies that are the problem, control of slew rate in the signal (i.e., making the signal more rounded, rather than square) also decreases the crosstalk. The original specifications for RS-232 had no specification for maximum slew rate. Voltage levels with respect to ground represent the RS 232 signals. There is a wire for each signal, together with the ground signal (reference for voltage levels). This interface is useful for point-to-point communication at slow speeds. For example, port COM1 in a PC can be used for a mouse, port COM2 for a modem, etc. This is an example of point-to-point communication: one port, one device. Due to the way the signals are connected, a common ground is required. This implies limited cable length - about 30 to 60 meters maximum. (Main problems are interference and resistance of the cable.) Shortly, RS 232 was designed for communication of local devices, and supports one transmitter and one receiver.
  1. RS422 and RS485
When communicating at high data rates, or over long distances in real world environments, single-ended methods are often inadequate. Differential data transmission (balanced differential signal) offers superior performance in most applications. EIA has recently released new serial interface, RS-422 and RS-485. These standards were designed for highspeed communication.

3.1. RS422 Serial Communication
RS422 is a Standard interfaces approved by the Electronic Industries Association (EIA), and designed for greater distances and higher Baud rates than RS232. In its simplest form, a pair of converters from RS232 to RS422 (and back again) can be used to form an "RS232 extension cord." Data rates of up to 100K bits / second and distances up to 4000 Ft. can be accommodated with RS422. RS422 is also specified for multi-drop (party-line) applications where only one driver is connected to, and transmits on, a "bus" of up to 10 receivers. RS422 devices cannot be used to construct a truly multi-point network. A true multi-point network consists of multiple drivers and receivers connected on a single bus, where any node can transmit or receive data.

3.2. RS485 Serial Communication
RS485 is an Electronics Industry Association (EIA) standard for multipoint communications. It supports several types of connectors, including DB-9 and DB-37. RS-485 issimilar to RS-422 but can support more nodes per line RS485 meets the requirements for a truly multi-point communications network, and the standard specifies up to 32 drivers and 32 receivers on a single (2-wire) bus. With the introduction of "automatic" repeaters and high-impedance drivers / receivers this "limitation" can be extended to hundreds (or even thousands) of nodes on a network. The RS-485 and RS-422 standards have much in common, and are often confused for that reason. RS-485, which specifies bi-directional, half-duplex data transmission, is the only EIA/TIA standard that allows multiple receivers and drivers in "bus" configurations. RS-422, on the other hand, specifies a single, unidirectional driver with multiple receivers.

3.3. Converters
Converters in general can be used to change the electrical characteristic of one communications standard into another, to take advantage of the best properties of the alternate standard selected. For example, an Automatic RS232<=>RS485 converter, could be connected to a computer's RS232, full-duplex port, and transform it into an RS485 half-duplex, multi-drop network at distances up to 4000ft. Converters in most instances, pass data through the interface without changing the timing and/or protocol. While the conversion is "transparent" the software must be able to communicate with the expanded network features. An "Automatic Converter" (RS232<=>RS485) will turn on the RS485 transmitter when data is detected on the RS232 port, and revert back into the receive mode after a character has been sent. This avoids timing problems (and software changes) that are difficult to deal with in typical systems. When fullduplex is converted into half-duplex only one device at a time can transmit data. Automatic Converters take care of the timing problems and allow fast communications without software intervention.
  1. Summary Table
The table below compares the specifications of RS232, RS423, RS422, and RS485. Specifications for RS232, RS423, RS422, and RS485 Specifications RS232 RS423 RS422 RS485 Mode of Operation Single-Ended Single-Ended Differential Differential Allowed no. of Tx and Rx 1 Tx, 1 Rx 1 Tx, 10 Rx 1 Tx, 10 Rx 32 Tx, 32 Rx Maximum cable length 50 Feet 4000 Feet 4000 Feet 4000 Feet Maximum data rate 20 kbps 100 kbps / 10 mbps 100 kbps / 10 mbps 100 kbps / 10 mbps Minimum driver output range ±5V to ±15V ±3.6V ±2V ±1.5V Maximum driver output range ±25V ±6V ±6V ±6V
Tx load impedance (Ohms) 3k to 7k >=450 100 54
Rx input sensitivity ±3V ±200mV ±200mV ±200mV
Rx input voltage range ±15V ±12V ±7V -7V to +12V
Maximum Rx input resistance 3k to 7k 4k min 4k min >=12k (Ohms)




No comments:

Post a Comment