The Serial (RS-232) Interface.
Recommended
Standard 232 (RS-232) defines the way in which a PC talks to and from the outside world, via a specific arrangement of pins and voltage levels. The arrangement of pins and voltage levels is normally configured in the form of a 9 way or a 25 way connector. Because the communication via the 9-way connector is carried out serially, the hardware output port is often referred to as a serial port. The terms serial port and RS-232 are used interchangeably, and in terms of PCs are usually used to describe the 9-pin port on the back of a desktop or laptop PC, although they may also refer to the 25-pin port on the back of a desktop or laptop PC.
The actual protocol that is used for communication via the RS-232 port is the UART (Universal Asynchronous Receive transmit) Protocol. As per the name, it is an asynchronous serial protocol. Just to make things interesting, if an interface is referred to as serial, it doesn't neccesarily mean it is an RS-232 interface, since it could be a synchronous serial protocol such as SPI, CANBus (Controller Area Network Bus) or I
2C. A synchronous protocol adds a clock line in addition to the transmit, Receive and Ground Lines.
Although more and more PC's are being built with, and making use of USB (Universal Serial Bus) ports, the RS-232 port is still widely used on laptop and desktop PCs. Generally, desktop PCs are equipped with 2 RS-232 ports, generally referred to as ttyS0 (Linux) or COM1 (Windows), and ttyS1 (Linux) or COM2 (Windows). The RS-232 port provides an excellent way of connecting a PC to non-standard external hardware such as sensors, or to connect to hardware for automation purposes. This is because RS-232 is simple, well defined, and well supported.
RS-232 Pinouts and functions.
| Pin Number |
Abbreviation |
Function |
| 1 | DCD | Data Carrier Detect |
| 2 | RX / RD / RXD | Receive Data |
| 3 | TX / td / TXD | transmit Data |
| 4 | Dtr | Data Terminal Ready |
| 5 | GND | Ground |
| 6 | DSR | Data Set Ready |
| 7 | RTS | Request To Send |
| 8 | CTS | Clear To Send |
| 9 | RI | Ring Indicator |
Null Modems
A Null Modem is a variation on the standard RS-232 pinout, and is most often found in cables connecting a Palmpilot or Windows CE device to a device such as a GPS or a data logger. A Null Modem has a different pinout configuration to a standard RS-232 pinout configuration, although the same connectors are generally used (
e.g. DB-9 and DB-25 connectors).
See also:
Games Port,
Parallel Port,
PS/2,
VGA,
RJ-45 Network Port,
USB,
Firewire,