Connectors

There are a lot of connectors type for rs232 interfaces, in the table RS232 Connectors we show the most used connectors:

 

Connector

Male

Female

DB25

DB9

RJ45

DB8 mini DIN

 

You can find DB25 and DB9 connectors frequently, the RJ45 connector is rare and the DB8 connector was used specially in old Macintosh systems.
In this serie we will make large use of DB9 and DB25 connectors.

 

Connection between two DTEs
A Null Modem is used to connect two DTE together. This is commonly used as a cheap way to network games or to transfer files between computers using Zmodem Protocol, Xmodem Protocol etc. This can also be used with many Microprocessor Development Systems.

25 Pin

9 Pin

 

9 Pin

25 Pin

Description

1

X

1

FG

2

3

2

3

RD

3

2

3

2

TD

4

7

 

5

CTS

5

8

7

4

RTS

7

5

5

7

SG

6

6

4

20

DTR

20

4

6

6

DSR

The simplest method of wiring a Null Modem only requires 3 wires (TD, RD & SG) to be wired straight through thus is more cost effective to use with long cable runs. The theory of operation is reasonably easy. The aim is to make to DTE think it is talking to a DCE rather than another DTE . Any data transmitted from the first computer must be received by the second thus TD is connected to RD. The second DTE must have the same set-up thus RD is connected to TD. Signal Ground (SG) must also be connected so both grounds are common to each DTE.
The Data Terminal Ready is looped back to Data Set Ready and Carrier Detect on both computers. When the Data Terminal Ready is asserted active, then the Data Set Ready and Carrier Detect immediately become active. At this point the computer thinks the virtual DCE to which it is connected is ready and has detected the carrier of the other modem.
All left to worry about now is the Request to Send and Clear To Send. As both computers communicate together at the same speed, flow control is not needed thus these two lines are also linked together on each computer. When the computer wishes to send data, it asserts the Request to Send high and as it's hooked together with the Clear to Send, It immediately gets a reply that it is ok to send and does so.
Notice that the ring indicator is not connected to anything of each end. This line is only used to tell the computer that there is a ringing signal on the phone line. As we don't have a modem connected to the phone line this is left disconnected.

 

Connection between DTE and DCE
All DTE-DCE cables are straight through meaning the pins are connected one on one.

Loopback connection
Using a loopback connection it's possible to test if the serial interface is working properly without using any other hardware devices. Once you have attached the loopback connector to your serial interface you only need to use a serial terminal like HyperTerminal or minicom, for each character you type on your keyboard you shall receive the same character as echo.
It is very simple to find loopback connectors in the market (in Picture 1 you can see a common loopback connector), however building your own loopback connector is very simple. The simplest loopback connector is built joining together the Transmit Data pin with the Receive Data pin. So you can build it making only two welds..

(to be continued…)

The index page