Chapter 5 RS-232 Library
© National Instruments Corporation 5-5 LabWindows/CVI Standard Libraries
All serial devices are either of the type Data Communication Equipment (DCE) or Data
Transmission Equipment (DTE). The PC is of type DTE. The difference between the two
devices is in the meaning assigned to the pins. A DCE device reverses the meaning of pins 2 and
3, 4 and 5, and 6 and 20. In the simplest scenario, a DTE device is attached to a DCE device,
such as a modem. Therefore, the cable required for a PC (or DTE) to talk to a device that is a
DCE is shown in Table 5-3.
Table 5-3. DTE to DCE Cable Configuration
(PC) Connect pins as indicated: (Device)
TxD* 2_______________2 RxD
RxD 3_______________3 TxD*
RTS* 4_______________4 CTS
CTS 5_______________5 RTS*
DSR 6_______________6 DTR
DTR* 20 ______________20 DSR*
common 7_______________7 common
You need a different cable for the PC to talk to a DTE device, because both devices transmit data
over pin 2. The cable to connect a PC to a DTE is called a null modem cable. A null modem
cable must be built as shown in Table 5-4.
Table 5-4. PC to DTE Cable Configuration
(PC) Connect pins as indicated: (Device)
TxD* 2_______________3 RxD
RxD 3_______________2 TxD*
RTS* 4_______________5 CTS
CTS 5_______________4 RTS*
DSR 6_______________20 DTR
DTR* 20 ______________6 DSR*
common 7_______________7 common
For further information on the meaning of DTE and DCE, refer to a reference book on RS-232
communication.
In the simplest case, a serial cable needs lines 2, 3, and 7 for basic communication to take place.
Hardware handshaking and modem control can require other lines, depending on your