Serial port pinout

Serial port interface pinout and signals

9
pin #
25
pin#
Acronym Full name Direction Description
3
2
TxD
Transmit Data
--»
Transmits bytes out of computer or device
2
3
RxD
Receive Data
«--
Receives bytes into computer or device
7
4
Request To Send
--»
RTS/CTS flow control
8
5
CTS
Clear To Send
«--
RTS/CTS flow control
6
6
DSR
Data Set Ready
«--
This device is ready to communicate
4
20
DTR
Data Terminal Ready
--»
This device is ready to communicate
1
8
DCD
Data Carrier Detect
«--
Modem connected to another
9
22
RI
Ring Indicator
«--
Ringing on telephone line
5
7
SG
Signal Ground    

Note: DCD can be sometimes labeled as CD

Port Pins May Have No Constant Meaning

Only 3 pins of the 9 have a fixed meaning: send, receive and signal ground. This is defined by the hardware interface and you can't change it. But all other pins can be controlled by a software and can be used for other tasks (rarely). EIA/TIA (Electronic Industries Alliance /Telecommunications Industry Association) issued several RS232 standards. RS232 defines both the physical and electrical layers of this interface. RS232 is usually similar with ITU V.24 (pins description and names) and V.28 (electrical). RS232 uses following voltages for signals:

  • Signal = 0 (LOW) > +3.0V (+3V ... +12V)
  • Signal = 1 (HIGH) < -3.0V (-12V ... -3V)

For example, Advanced Serial Port Monitor can automatically control the DTR signal and set it LOW (-12V) when sends data out. A modem (or another device) that receives this DTR signal on another side (if these pins are connected) may do various things. For example, a modem can hang up the telephone line when DTR is LOW. In other cases the modem may not handle this signal or do something else when DTR is LOW (-12V).

It is possible for all the 6 signal wires, but usually in standard devices these signal pins are used as described in the table above. The Advanced Serial Port Monitor software can work with all signal of the RS232 interface.

How to connect RS232 ports using cables

A serial port is used to connect devices or computers, and therefore it should be connected to to another serial port. An external device or modem that is connected to the serial port has an identical built-in serial port. It is possible two connection types between serial ports: straight (pins 2 on both sides are connected) or null-modem (pin #2 is connected to pin #3 on another side). First connection type is used between DTE (Data Terminal Equipment) and DCE (Data Communications Equipment) devices (for example, a computer and modem), and the second connection type is used between two DTE devices (for example, two computers or a computer and an external device). There are several cable layouts possible. You can see examples in the "Serial cable connection" chapter.

All signals of the RS232 port is are unidirectional. For example, if pin #2 outputs data, then it is unable to receive any signal using this pin. Therefore, you can't connect two devices that can send data out (DTE-DTE connection) using a straight cable . If you will do it, then they would both send out signals on the same wire but neither would be able to receive any signal.

Initially, RS232 ports were used for connecting a dumb terminal (DTE) to a modem (DCE). Nowadays computers used as DTE instead of a terminal. The meaning of the pins are the same on both Data Terminal Equipment and Data Communications Equipment. The names: "receive" and "transmit" should be intepreted from the "point of view" of the computer (DTE).

The serial port was initially intended to be used for connecting DTE to DCE using a straight-thru (null-modem) cable.

RS232 pinout and signals
Serial port pinout and signals
DB9 pinout and signals
DB25 pinout and signals