Thursday, November 14, 2013

Serial Port (RS232) - Null Modem / Straight Through

The Difference Between a Null Modem and Straight Through Serial Cable

Hardware: Serial

Problem:
I would like to use my computer's built-in serial port to communicate with a serial device, and I have both the null modem and straight through serial cables. What is the difference between the two cables, and which one should I use?

Solution:
The null modem cable is frequently called a crossover cable. It is used to allow two serial Data Terminal Equipment (DTE) devices to communicate with each other without using a modem or a Data Communications Equipment (DCE) device in between. For this to happen, the Transmit (TXD) pin of one device needs to be connected to the Receive (RXD) pin of the other device.  To enable handshaking between the two devices, the Request to Send (RTS) pin of one device must be connected to the Clear to Send (CTS) pin of the other device. Because these pins are "crossed" on the two cable terminals, the name crossover cable is used.

Simple Null Modem Cable

clip_image004

Null Modem Cable with Handshaking

clip_image006

A straight-through cable is used to connect a DTE device to a DCE device. The TXD-RXD and RTS-CTS pins are not cross-connected in this case, hence the term straight through cable.

Simple Straight Through Cable

clip_image008

The built-in serial port on a PC is a DTE device. Modems and printers are examples of DCE devices.  Note that an instrument with serial interface could be either a DTE or a DCE device.  It is best to check the user manual of the instrument to find out the device type.  For more information regarding DTE and DCE devices, please see the links below.
To tell if your cable is null modem or straight though, you can search the part number at ni.com, the product description will tell if it is null modem. Alternatively you can use a hand held DMM to test continuity on the individual pins of your serial cable. If every pin is electrically connected to the corresponding pin on the other end, i.e.: pin 1 to pin1, pin 2 to pin 2, etc. then the cable is straight through.


Related Links:
Products and Services: Serial Interfaces
KnowledgeBase 1TU953QR: What Do DTE and DCE Mean in Serial Communication?
Developer Zone Tutorial: Serial Communication General Concept

Attachments:

Report Date: 22/12/2004
Last Updated: 18/06/2010
Document ID: 3GLDMSIT

Taken From: http://digital.ni.com/public.nsf/allkb/1EE0DD8AF67922FA86256F720071DECF

1 comment: