2
\$\begingroup\$

I have an old DB-9 connector (Male-to-Female). I cut it in half, to find 6 wires inside. 5 Had colored insulators and one was a strand of naked wires.

First question: isn't it supposed to have 9 wires instead of 6?
Second question: which pins do those wires corresponds to? Is there a universal color code for this?

I have the colors yellow, green, white, red and black.

\$\endgroup\$
  • 3
    \$\begingroup\$ You can always take a meter and do a continuity test from your wires to pins. \$\endgroup\$ – efox29 Apr 22 '13 at 17:07
  • 2
    \$\begingroup\$ No, there's no standard for this in any case. \$\endgroup\$ – Dave Tweed Apr 22 '13 at 17:14
  • \$\begingroup\$ @efox29 : I don't know why it didn't worked? \$\endgroup\$ – cipher Apr 22 '13 at 17:24
  • \$\begingroup\$ you probably didnt connect the leads to the pins or wires good enough. It happens to me too sometimes. Check your meter by touch the leads on itself, and see if you get what you expect. If not, then its your meter. If your meter is good, then connect one lead to to a random wire and then slide the other lead across the pins. \$\endgroup\$ – efox29 Apr 22 '13 at 17:33
  • \$\begingroup\$ Does the connector have "ears"? Some video game systems use five wires plus ground to represent directions on a joystick along with a "fire" button; perhaps the cable was an extension cable for such a system. \$\endgroup\$ – supercat Apr 22 '13 at 20:14
3
\$\begingroup\$

The original serial connectors were 25 pins, with some/many/most of the pins used. The DB-9 RS-232 connector just takes the nine most popular pins from the DB-25 connector. In either DB-25 or DB-9 connector, which pins are actually used depends on the hardware/software implementation of the serial protocol. At minimum, for two-way serial communication you need just three pins:

  • RX (Receive) - connected to TX on the other end. Pin 2 on standard DB-9 and DB-25
  • TX (Transmit) - connected to RX on the other end . Pin 3 on standard DB-9 and DB-25
  • GND (Signal ground) - Pin 5 on standard DB-9 and pin 7 on standard DB-25

(Note that sometimes particular serial cables are wired in non-standard way, but this is very rare. Indeed, there is a number of possible serial connectors). If your serial communication is one-way then you might only use two pins: TX/RX and GND.


The particular cable you have connects the six most popular lines. Cables that connect only some of the DB-9 serial lines are widely available, though do not assume that the same six pins are connected on all DB-9 cables. Depending on your needs, the six connected pins may or may not be sufficient. If you know which pins your hardware/software needs, then you would look for a cable that has those pins actually wired. For most modern needs (if "modern" can be used to apply to serial port in 2013) six wires is sufficient.


Unfortunately, there is no standard for color coding serial lines. You might hope that signal ground is black/brown, though often it is green, or some other random color. TX/RX are often yellow and green, but again you cannot count on this. The only way to know which color is connect to what pin is to test with a multimeter.

\$\endgroup\$
1
\$\begingroup\$

Assuming your connector is for RS-232 (notice that a DB9 may be used for other interfaces too) there are pins that aren't used in some cases. For instance, a cable to connect two computers doesn't need the RI (ring indicator) pin; also one of the pairs RTS/CTS or DSR/DTR may not be connected, since either one or the other is used in most transmission modes. Take a look at http://pinouts.ru/SerialPorts/Serial9_pinout.shtml

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.