The RS-232 Standard
The EIA RS-232 standard is the best known of the serial data interface standards. It is equivalent to the CCITT V.24 Interface.
The RS-232 Interface was developed for a single purpose and is defined as the 'Interface between Data Terminal Equipment (DTE) and Data Communication Equipment (DCE) employing serial binary data interchanges'.
DTE relates to a device which transmits data on pin 2 and receives data on pin 3 (for a 25 pin connector). A computer is an example of a DTE device.
DCE relates to a device which transmits data on pin 3 and receives data on pin 2 (for a 25 pin connector). An example of a DCE device is a modem.
A connection between two devices is shown in Figure 2. One device is a microcomputer and the other a modem. There are effectively two types of connecting lines:
1. Data lines (pin numbers 2, 3) which
transmit useful data.
2. Control lines (pin numbers 4, 5, 6, 8, 20, 22) which are used to control the flow of data between the two devices, commonly known as
hardware handshaking.
In addition, the Signal Ground common (pin number 7) is used by the data and control lines.

Figure 2. Pin
Assignments Between a DTE and a DCE Device (25 Pin Connector)

Common DB9 and DB25 Pin Assignments for a DTE for
RS-232