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).
|Num. Wires (excl. GND)||2 (TX/RX) or 4 (TX/RX and RTS/CTS)|
|OSI Layers||Layers 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.
- RS-232C (or just shortened to RS-232)
- EIA-232-D (1987)
- EIA/TIA-232-E (1991)
15m or less
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.
The pinout of a typical Analog Devices RS-232 to UART transceiver is shown below.
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.
- UART Communication Protocol
- I2C Communication Protocol
- July 2016 Updates
- Modbus Protocol
- February 2018 Updates