5
\$\begingroup\$

In my design I am using RS232 with DB9 connector in my PCB. idea is to log the data in PC and for programming via serial. Which connector I need to use in my board , it is male DB9 or female DB9. enter image description here

Q1) What connector I need to use in my board male or female Q2) If I use male connector in my board then Pin TO1 will need to connect to pin 2 or pin 3.

\$\endgroup\$
5
  • \$\begingroup\$ What cable do you intend to use? It's your design, right? \$\endgroup\$
    – Eugene Sh.
    Commented Jun 17, 2016 at 17:00
  • \$\begingroup\$ Yes, I am taking this reference design in my board, confuse what type connector to use male or female in my board, also confuse TO1 need to connect to pin 2 or 3 of DB9 \$\endgroup\$ Commented Jun 17, 2016 at 17:02
  • 3
    \$\begingroup\$ You didn't get what I mean... It is your design, your system, so you should know which signal is going where and how you interconnect the components. You might have different serial cables which are totally changing the answer to the question you've asked. They might be male or female on the devices end. And their pinouts will be different as well. \$\endgroup\$
    – Eugene Sh.
    Commented Jun 17, 2016 at 17:04
  • \$\begingroup\$ I will connect this on board DB9 (male or female) to my PC via some cble like male to female , male to male or female to female depend on what i use. \$\endgroup\$ Commented Jun 17, 2016 at 17:09
  • \$\begingroup\$ Something to take into consideration as well is if you're supplying power from a connector, exposed pins present a risk (unless protected) for external object(s) to create a short-circuit. \$\endgroup\$ Commented Jun 17, 2016 at 21:13

2 Answers 2

3
\$\begingroup\$

Use Db9 female connector in your board, since PC have DB9 male connector , or if your PC dont have DB9 then you may need to used RS232 to USB converter cable, which has male DB9 port.

\$\endgroup\$
8
  • \$\begingroup\$ It doesn't mean anything. He might have a null-modem cable to interconnect the system.. \$\endgroup\$
    – Eugene Sh.
    Commented Jun 17, 2016 at 17:25
  • \$\begingroup\$ He already mentioned that he need to connect his PC to log the data or for programming only. \$\endgroup\$
    – Bharav
    Commented Jun 17, 2016 at 17:27
  • \$\begingroup\$ So? It can be done very well through a null-modem cable. \$\endgroup\$
    – Eugene Sh.
    Commented Jun 17, 2016 at 17:27
  • \$\begingroup\$ why use a cross over cable( null modem cable), when straight cable can do this job. Also using DB female in PCB does not change the world. \$\endgroup\$
    – Bharav
    Commented Jun 17, 2016 at 17:33
  • 4
    \$\begingroup\$ IMO the usb-serial cable argument is the best: make the board so it can connect directly to a usb-serial cable. That means DB9F on the board. Next step: if you want to extend such a connection, you need a straight M-F cable, and that is also what you want between a PC and the board. So IMO DB9F on the board wins hands down for this situation. (For a 'master' board things would be different.) \$\endgroup\$ Commented Jun 17, 2016 at 17:46
19
\$\begingroup\$

The original plan when the D-sub connector family was introduced was that equipment would always have female connectors and cables would always have male connectors. The idea was that pins are easily damaged, and it's usually easier to replace a cable than to replace a connector on a piece of equipment. Designations such as "DCE" (data communications equipment) and "DTE" (data terminal equipment) would indicate whether signals such as TXD and RXD were inputs or outputs on the equipment.

However, when the IBM PC came along, they decided to use D-sub connectors for a number of different purposes, so in order to reduce confusion for users, they used a female connector for the printer port and a male connector for the COM (UART) port.

As a result, it has become common to use a male connector on DTE and a female connector on DCE. If you want to connect your device to a PC, you should put a female connector on it so that you can use a straight-through male-to-female cable to plug it in.

And just to be pedantic, the correct designation is "DE-9". "DB" refers to the larger shell used for the 25-pin connector.

\$\endgroup\$
3
  • 3
    \$\begingroup\$ The last sentence is a discovery for me... \$\endgroup\$
    – Eugene Sh.
    Commented Jun 17, 2016 at 17:11
  • 2
    \$\begingroup\$ Unfortunately, DB-9 became so pervasive that Digi-Key and a few other sides will still list a DE-9 connector as a DB-9 because that's what people call them. \$\endgroup\$ Commented Jun 17, 2016 at 21:12
  • \$\begingroup\$ Thank you. This answer needs to go into Wikipedia if it isn't already there. \$\endgroup\$
    – Sabuncu
    Commented Dec 2, 2023 at 17:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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