EmbLogic's Blog

RS232 Connection & Signals

Synchronous and Asynchronous Communications

Synchronous Communication requires the sender and receiver to share the same clock. The sender provides a timing signal to the receiver so that the receiver knows when to “read” the data. Synchronous Communication generally has higher data rates and greater error-checking capability. A printer is a form of Synchronous Communication.

Asynchronous Communication has no timing signal or clock. Instead, it inserts Start/Stop bits into each byte of data to “synchronize” the communication. As it uses less wires for communication (no clock signals), Asynchronous Communication is simpler and more cost-effective. RS-232/RS-485/RS-422/TTL are the forms of Asynchronous Communications.

RS-232C, EIA RS-232, or simply RS-232, refers to the same standard defined by the Electronic Industries Association in 1969 for serial communication.

RS-232 Connections

A straight-through cable is used to connect a DTE (e.g. computer) to a DCE (e.g. modem), all signals in one side connected to the corresponding signals in the other side in a one-to-one basis. A crossover (null-modem) cable is used to connect two DTE directly, without a modem in between. They cross transmit and receive data signals between the two sides and there are many variations on how the other control signals are wired.

The data transmission starts with a Start bit, followed by the data bits (LSB sent first and MSB sent last), and ends with a “Stop” bit.

The voltage of Logic “1″ (Mark) is between -3VDC to -15VDC, while the Logic “0″ (Space) is between +3VDC to +15VDC.

RS-232 connects the Ground of 2 different devices together, which is the so-called “Unbalanced” connection. An unbalanced connection is more susceptible to noise, and has a distance limitation of 50 ft (which is around 15 meters).

Handshaking is also called “Flow Control”. The main purpose of Handshaking is to prevent receiver overloading. By using Handshaking signals, receivers will be able to tell the sending device to pause data transmission if the receiver is overloaded. There are three types of handshaking: Software handshaking, Hardware handshaking and Both.

Software handshaking uses two control characters: XON and XOFF. The receiver sends these control characters to pause transmitter during communication. XON is decimal 17 and XOFF is decimal 19 in the ASCII chart. The drawback of Software handshaking is that these two control characters can not be used in data. This is quite important when you are transmitting Binary data as you might need to use these two codes in your data.

Hardware handshaking makes use of actual hardware lines, such as RTS/CTS, DTR/DSR, and DCD/RI (for modem).

The DTE 1 uses the DTR (Data Terminal Ready) signal to indicate it is ready for information exchange, whereas the DTE 2 uses the DSR signal for the same purpose. Before sending a data, the DTE 1 asks permission by setting its RTS output to high. No data will be sent until the DTE 2 grants permission by using the CTS line.  RTS/CTS are ON or OFF for each data transmission. DCD (Data Carrier Ready) is used by the modem when a connection has been established with remote equipment, while RI (Ring Indicator) is used by the modem to indicate a ring signal from telephone line.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>