- Asked 2/20
- 2071 Shrawan · 5 marks
- 2078 Kartik · 5 marks
Connecting two DTE RS-232 devices
Short answer
Connecting two DTEs directly causes TXD-to-TXD and RXD-to-RXD contention, preventing communication. A null modem cable crosses TXD with RXD and handshake lines (RTS to CTS, DTR to DSR) to resolve it.
Describe the problem that occurs when you attempt to connect together two Rs.232 devices that are both configured as DTE. Draw a diagram which shows how this problem can be resolved.
The problem
RS-232 is defined for a DTE to DCE connection with a straight-through cable: the DTE transmits on TXD (pin 2) and receives on RXD (pin 3); the DCE does the opposite. If two DTEs (for example two PCs) are connected with a straight cable:
- TXD of one is connected to TXD of the other, so two output drivers are connected together (contention, possible damage) and neither receives data.
- RXD is connected to RXD, so both receivers are listening to nothing.
- The handshake lines clash in the same way: RTS to RTS and DTR to DTR (outputs together), and the inputs CTS, DSR and DCD get no signal, so a device waiting for CTS or DSR waits forever.
DTE A (PC) DTE B (PC)
TXD 2 ------------------------ TXD 2 (output to output)
RXD 3 ------------------------ RXD 3 (input to input)
RTS 4 ------------------------ RTS 4
CTS 5 ------------------------ CTS 5
GND 7 ------------------------ GND 7
Solution: null modem (crossover) cable
The cable makes each DTE think it is talking to a DCE by crossing the transmit/receive lines and the handshake lines. In the sketch, the number after each arrow is the pin on DTE B.
DTE A (DB-25) DTE B (DB-25)
TXD 2 ------------------------------> 3 RXD
RXD 3 <------------------------------ 2 TXD
RTS 4 ------------------------------> 5 CTS
CTS 5 <------------------------------ 4 RTS
DTR 20 ----------------------------+-> 6 DSR
+-> 8 DCD
DSR 6 <-+--------------------------- 20 DTR
DCD 8 <-+
GND 7 -------------------------------- 7 GND
Connections: TXD(A) -> RXD(B) and TXD(B) -> RXD(A); RTS(A) -> CTS(B) and RTS(B) -> CTS(A); DTR(A) -> DSR and DCD (B) and the reverse; signal ground straight through. The simplest null modem needs only three wires (TXD, RXD, GND), and the handshake inputs are looped back at each end (RTS to CTS, DTR to DSR and DCD) so the software never waits.
✓ Answer checked by Claude Sonnet 5.5
Related questions
- USB to RS-232 adapter design · Instrumentation II, chapter 3
- Simplex, half and full duplex using RS-232 · Instrumentation II, chapter 3 · asked 2×
- TTL to RS-232 interfacing circuit · Instrumentation II, chapter 3
- Importance and working of RS-232C · Instrumentation II, chapter 3
- Sports car dashboard coupling problem · Instrumentation II, chapter 6
- 8255 mode 2 operation with timing diagram · Instrumentation II, chapter 2
- RS-232 signals, handshaking, DTE-DCE · Microprocessor, chapter 4 · asked 3×
- Short note: RS-232 standard · Microprocessor, chapter 4 · asked 3×
- Resection, two point problem, intersection · Surveying II, chapter 5
- Two point problem; advantages, disadvantages · Surveying I, chapter 6