m menu image  m home m cart

Your header in Here


Advanced Serial RS232 and RS485 Connectivity

The RS232 and RS485 interfaces use asynchronous serial communication. This means that they utilizes start and stop bits in order to know when information is being sent. This is a bit different from the synchronous data communication in which devises must be synchronized at first and then send data continuously. This means that in the latter, idle RS232 data has to be sent, sometimes, in order to keep the two devises connected. This makes devices that use synchronous RS232 or RS485 communication a wee bit inefficient.

On the other hand, RS232 / RS485 serial ports 'waits' for the start bit to begin transmitting data. While waiting for the start bit, the port is usually in a mark state (idle state). This state has the value of 1 and indicates that no communication is taking place. Since RS232 and RS485 data is bipolar - has both negative and positive voltages- this mark state occurs when the voltage is zero. When the start bit is received, the state changes from 1 (mark state) to 0 (active state). Henceforth, a stream of RS232 data bytes can be sent until a stop bit is received. This, stop bit, will then terminate communication between the two devices.
The two devices in question here are the DTE and the DCE devices. These devices are connected by an RS232 cable whose length is limited to about 25 feet. The DTE device (mostly a PC) usually has a 25 pin male connector. On the other hand, the DCE device (usually a modem) has the same number of pins but the RS232 connector is female. At this point, it's important to note that the DTE device is used as the point of reference. This means that pin configuration and assignment is perceived from the standpoint of the DTE device.

In the above light, of the DTE devise being used as the standpoint, the number 1 pin in a 25 pin RS232 connector is used as a protective ground. The number 2 pin is used as a transmitting data pin (TD)-outgoing data from the DTE device to DCE device. This transmitting pin is hence the receiving RS232 wire on the DCE. The DTE receives RS232 data (RD)-information coming from the DCE device - on pin 3. When RS232 / RS485 data communication starts and hardware flow control (handshaking) is enabled, another set of lines are activated. These are RTS (request to send) and CTS (clear to send) lines.
After activation of these RS232 lines, the DTE communicates with the DCE device so that information can be sent. Depending on the buffer level of the DCE device, the DTE device will either be able to send RS232 information or otherwise. If the buffer level of the DCE device is not full, then it will attain a mark state. This enables the DTE device to send RS232 information after it has sent the request using the RTS wire which is usually pin number 4 in the 25 pin connector. This means that the CTS assert the RTS so that RS232 to RS485 information is sent successfully. In case the buffer becomes full, the CTS 'deasserts' the RTS so that the flow of data is minimized. However, to fully terminate the RS232 or RS485 communication, a software flow control is usually required in order to monitor the buffer levels in the devices.

Another set of RS232 data control lines are DTS (Data Terminal Ready) and DSR (Data set ready). The former line complements the latter, and they work in a way that is very similar to the RTS/CTS. They were initially designed to provide another mode of RS232 hardware flow control or handshaking. The DSR is usually on pin 6 while the DTR is on pin 20 in the 25 pin connector. However, these two RS232 lines are rarely used today. This is because the hardware handshaking that is accomplished by the RTS/CTS relationship suffices in communicating data in RS 232 serial ports.

For further information regarding serial data communication please visit http://www.USconverters.com.


Publishing rights: You may republish this article at your website, newsletter or ebook on the condition that you agree to leave the article, author's signature and all links completely intact.