COMMUNICATION PROTOCOLS

RS-232 Protocol

Date Published:
Last Modified:

Overview

RS-232 is a digital data transmission protocol with origins dating back to the 1960’s. It was designed as a communication protocol to talk between DTE (data terminal equipment) and DCE (data communication equipment).

Drive TypeSingle-ended
Num. Wires (excl. GND)2 (TX/RX) or 4 (TX/RX and RTS/CTS)
DuplexityFull
Connection TopologyPoint-to-point
OSI LayersLayers 1 (physical) and 2 (data link)

RS-232 is commonly used today for a variety of different purposes in embedded systems, incl industrial equipment, test and measurement equipment. RS-232 ports are no longer available on most desktop computers (and certainly not on laptops), but USB-to-RS232 adapters are cheap, popular and easy to use with almost any operating system.

Pinout

The pinout of a male RS-232 DE-9 connector. Image from http://www.ethernut.de/.

The pinout of a male RS-232 DE-9 connector. Image from http://www.ethernut.de/.

Revisions

  • RS-232C (or just shortened to RS-232)
  • EIA-232-D (1987)
  • EIA/TIA-232-E (1991)

Transmission Distances

15m or less

Higher-Level Protocols

Do you need a higher-level communication protocol that works over a UART connection? See the SerialFiller library on GitHub (written in C++). SerialFiller uses a publish/subscribe mechanism and works well on point-to-point serial connections such as UART.

Interfaces

The pinout of a typical Analog Devices RS-232 to UART transceiver is shown below.

Pinout of a RS-232 transceiver by Analogue Devices.

Pinout of a RS-232 transceiver by Analogue Devices.

Another example of a RS-232 to CMOS UART converter is the MAX3221IDBE4. It supports an auto-shutdown feature based on the voltage-level of the receiving RS-232 line.

Cheap Discrete-Part RS-232 To TTL Converter

A RS-232 to TTL logic-level converter can be made out of a few discrete components. The schematic shown below uses some clever circuitry, including a charge-pump like circuit, to generate the negative voltage required for RS-232 transmission back to the computer.

The schematic of a cheap, discrete-part RS-232 to TTL logic-level converter. Image from Atmel AVR910 (http://www.atmel.com/).

The schematic of a cheap, discrete-part RS-232 to TTL logic-level converter. Image from Atmel AVR910 (http://www.atmel.com/).


Related Content:

Tags:

comments powered by Disqus