HTBasic Help
×
Menu
Index

Cabling From the Ground Up

 
If you wish to identify a cable which should work in a particular application, it can be done using the straight forward method described here. First, examine the connectors on the computer and the device. The most common connector is a 25 pin DB connector, but you will also commonly see 9 pin DB connectors. Less commonly, youll see connectors of all shapes and sizes. Connectors almost always have identifying numbers near some of the pins/holes which give the pin numbers. The DB connector pins are arranged in two rows, with the first row having one more pin than the second. The pins are numbered beginning with pin 1 on the wider row. You will need to understand the pin numbering system used in the connectors only if you plan to make your own cable.
 
Once you have identified the type of connectors you will need, begin drawing a cable diagram using the steps in the following paragraphs. When your diagram is complete, match it with descriptions of the cables you have available. Then use, buy, or build the correct cable.
 
Pin 7 is usually the ground pin on a DB-25 pin connector (or pin 5 on a DB-9 connector). This can be verified by turning off and unplugging the computer, disconnecting any cables between it and other devices, and measuring with an ohm meter between the chasis and pin 7. The resistance should be zero. If pin 7 is not the ground, try pin 1, and then the other pins in turn until a ground is found. Do the same for the device and then start building your cable diagram by drawing a connection from the ground pin of the computer to the ground pin of the device.
The computer and the device each talk on one pin of the RS-232 connector and listen on another. Pins 2 and 3 (or pins 3 and 2 on a DB-9) are usually used for talking and listening, respectively; but this is not always the case. Turn the computer on and with a voltmeter, measure the voltage between the chasis of the computer and pin 2. Then do the same for pin 3. Ignore the polarity of the voltage, we are interested in the magnitude only. In the discussion that follows, we will refer to the larger voltage as the "transmitter" voltage and the smaller voltage as the "receiver" voltage. The computer talks on the pin with the transmitter voltage and listens on the other. Make the same measurement on the device. Then on your diagram, hook the talk pin of the computer to the listen pin of the device and vice versa.
 
You have now defined a "3-wire cable" and in some instances your cabling task is done. Its probably worth trying, because if you can use a 3-wire cable, you will save yourself a lot of headaches. If data is lost when using a 3-wire cable, try enabling software handshaking (XON/XOFF), explained earlier. With software handshaking turned on, transfer data using the FORMAT ON option of ASSIGN. If software handshaking cannot be used on the device, you will need a hardware handshaking cable.
Lets continue defining a hardware handshaking cable. The three wires now hooked up are sufficient for transferring data. The goal now is to inform the computer and the device when each can and cannot send data to the other. Said another way, we wish to prevent the sending of data while the other is not ready to receive it. We must identify on which pins each presents its "Im ready" signal(s) and on which pins each asks "Are you ready?"
 
Get out your voltmeter again and measure pins 5, 6, and 8 (DB-9 pins 8, 6, and 1) on the computer. Remember that we are only interested in the magnitude. Some or all of them should have the "receiver" voltage. The ones that do are asking "Are you ready?" Now measure pins 5, 6, 8, and 20 on the device. One or more of these should have the "transmitter" voltage. If only pin 20 has it, it is the "Im ready" pin of the device. If more than one of these pins have the "transmitter" voltage, then use 5 if possible as the "Im ready" pin and any other if 5 is not possible. Draw a connection between all the "Are you ready?" pins of the computer to a single "Im ready" pin of the device.
 
All of the pins 5, 6, 8, and 20 on the device that have the "receiver" voltage are the devices "Ready?" pins. Pin 20 (DB-9 pin 4) on the computer is usually the "Ready!" pin of the computer. On your cable diagram, draw a connection between the "Ready!" pin of the computer and the "Ready?" pins of the device.
 
Your cable diagram is now complete. Match it with descriptions of the cables you have available. Then use, buy, or build the correct cable. If this cable does not work, you should probably call the manufacturer of the device and get their help.