The pinout of the DE-9 D-subminiature connector, also known as DE9, DB-9 or DB9 for PC serial RS-232 (RS232) COM port is detailed on this page.
This article describes the pin assignments of the most popular form of DE-9, also known as DE9, DB-9 or DB9 connector for serial communication known as RS-232, or RS-232C, or RS232, found on personal computers. Most modern computers, especially those manufactured after 2005, do not have integrated RS-232 communications, but it is possible to equip such a computer with a USB-to-RS-232 converter, for example. Despite being slow, RS-232 serial communiation may still be used in modern computers, peripheral devices and embedded systems, because it offers a practical, easy-to-program alternative to faster interfaces. In RS-232 terms, a computer is a Data Terminal Equipment (DTE), and a target or a pripheral device is a Data Circuit-terminating Equipment (DCE).
DE-9 Male connector at the DTE or computer
|1||DCD||Data Carier Detect||DTE<-DCE|
|4||DTR||Data Terminal Ready||DTE->DCE|
|6||DSR||Data Set Ready||DTE<-DCE|
|7||RTS||Request To Send||DTE->DCE|
|8||CTS||Clear To Send||DTE<-DCE|
The logical 1 (one), also known as "mark", on signal pins is encoded with negative voltage from -25V to -5V relative to ground. The logical 0 (zero), also known as "space", is encodded with positive voltage from +5V to +25V relative to ground. The idle state of RxD and TxD signals is logical 1. A Personal Computer (PC) typically sends or receives a character, one bit at a time, in following order: a mandatory start bit of logical 0, followed by 5 to 8 data bits with the Least Significant bit (LSb) or bit 0 being the first to appear and the Most Significant bit (MSb) being the last, followed by an optional parity bit, followed by one or two mandatory stop bits of logical 1. The optional parity bit could be used for error detection, could be omitted, or could be used as a custom bit. When used for error detection, the parity bit can implement "even" or "odd" parity. In case of even parity, if the count of data bits that are set to 1 is odd, then the parity bit is set to 1, thus making the total count of data and parity bits, which are set to 1, even. If the count of data bits that are set to 1 is even, then the parity bit is set to 0. In case of odd parity, if the count of data bits that are set to 1 is even, the parity bit is set to 1, in order to make the total count of data and parity bits, which are set to 1, odd. If the count of data bits that are set to 1 is odd, then the parity bit is set to 0.