The serial port
There are two variations of serial ports on a PC: 9-pin and 25-pin ports. The more common one is the one with 9 pins. Here a view on a 9-pin connector (male, the numbering of the female side is just the other way round).
The pin assignment is as follows:
|PIN (9-pin interface)||PIN (partially used 25-pin interface)||Function|
|1||8||CD (Carrier Detect)|
|2||3||RXD (Receive Data)|
|3||2||TXD (Transmit Data)|
|4||20||DTR (Data Terminal Ready)|
|6||6||DSR (Data Set Ready)|
|7||4||RTS (Request To Send)|
|8||5||CTS (Clear To Send)|
|9||22||RI (Ring Indicator)|
So, the pins with the functions RXD and TXD are intended for the actual data exchange, the signals DTR and RTS are outgoing control signals, the signals CD, DSR, CTS and RI are incoming status signals. The signal voltages are +12V for HIGH and -12V for LOW (these values can vary slightly on different PCs).
Another remark concerning serial interfaces: On some mainboards, the serial ports are connected to the mainboard with a cable and a 10-pin connector. This is the case especially for old AT boards and for newer boards where the connector places in the back panel are occupied by other connectors such as VGA and DVI. For those serial port connectors on the boards, there are two different pin assignments, so not every mainboard is compatible to every cable. The connectors nevertheless look the same!! So here is the pin assignment:
|PIN (Board)||PIN (9-pin, version 1)||PIN (9-pin, version 2)|