RS232 and RS485 DB9 pinouts

Thread Starter

charlessmith

Joined Feb 28, 2022
1
Hi guys.

In my current project i am trying to communicate with RS232 and RS485. Both should be present but one should be active. I am using MAX3160E transceiver, which allows me to switch between RS232 and RS485. Aim is to connect them to DB9 and control the transceiver to switch. But pin layout of DB9 confuses me. It seems like there is no standard. I wonder if it was correct to connect pins like this:



RS232RS485
1​
CTSR-
2​
RxR+
3​
TxT+
4​
RTST-
5​
GNDGND
6​
7​
8​
9​


Also I couldn't fully understand the hardware flow control in RS232. According to MAX3160E datasheet one of the RS232 channels can be used for RTS CTS function and I am considering to use them. But is it proper to connect them to pin1 and pin4 which are actually DCD and DTR pins of standard DB9 pin layout? What is the difference between RTS/CTS flow control and DTR/DSR/DCD on the hardware side?

Thanks in advance.

edit: This is another configuration I wonder if it is proper:



RS232RS485
1​
DCDNC
2​
RxR+
3​
TxT+
4​
DTRNC
5​
GNDGND
6​
DSRNC
7​
RTST-
8​
CTSR-
9​
RI
 
Last edited:

ericgibbs

Joined Jan 29, 2010
18,845
In my current project i am trying to communicate with RS232 and RS485.
Hi Charles,
It would help if you posted what equipment is used in this communication.

Using certain pins on the DB9 depends on the requirements of the communication protocol.

A simple diagram would help.
E
 

drjohsmith

Joined Dec 13, 2021
852
Hi guys.

In my current project i am trying to communicate with RS232 and RS485. Both should be present but one should be active. I am using MAX3160E transceiver, which allows me to switch between RS232 and RS485. Aim is to connect them to DB9 and control the transceiver to switch. But pin layout of DB9 confuses me. It seems like there is no standard. I wonder if it was correct to connect pins like this:



RS232RS485
1​
CTSR-
2​
RxR+
3​
TxT+
4​
RTST-
5​
GNDGND
6​
7​
8​
9​


Also I couldn't fully understand the hardware flow control in RS232. According to MAX3160E datasheet one of the RS232 channels can be used for RTS CTS function and I am considering to use them. But is it proper to connect them to pin1 and pin4 which are actually DCD and DTR pins of standard DB9 pin layout? What is the difference between RTS/CTS flow control and DTR/DSR/DCD on the hardware side?

Thanks in advance.

edit: This is another configuration I wonder if it is proper:



RS232RS485
1​
DCDNC
2​
RxR+
3​
TxT+
4​
DTRNC
5​
GNDGND
6​
DSRNC
7​
RTST-
8​
CTSR-
9​
RI
Unfortunately
there are many "standards"

depends if its a male or female,
and if its a DTE or a DCE !!

And even if its real RS232 at +- 25 v, or the more normal 0 to 5V type,

The only "constant" on RS232 is pin 5, ground,
and pin 2 and 3 are tx / rx , or rx / tx !

God the days of having to carry around a "universal" set of adapters, null modems et all,
USB has its problems, but at least it sorted that part out

This look like a good link

https://www.virtual-serial-port.org/article/what-is-serial-port/rs232-pinout/

https://www.pccompci.com/rs232-cable-technology.html
 

MaxHeadRoom

Joined Jul 18, 2013
28,683
If you don't require hardware handshake, you can just use 3 pins, RX,TX and GND with the handshake jumpered out.
IIRC it is 6-7 and 8-1-4 on the DB9.
 
Last edited:
Top