3

We have a program in Windows OS which is capable of reading serial data from an RS232 port or USB ports. We have a device which is only using RS485 communication (2 wire-half duplex).

Is there a way to use DB9 cable for reading data or should we convert RS485 to RS232 or USB? And if we do it is that enough for the program to read the data?

user16307
  • 12,049
  • 52
  • 184
  • 320
  • For a quick experimental monitoring-only solution (no transmitting) you may actually be able to connect one half or the other of the differential pair to the single RS232 input and receive data, though not necessarily in a manner compliant with the specification. That's because RS232 receivers will typically register voltage levels much lower than those which RS232 transmitters are supposed to send, and in the absence of noise that may be enough. – Chris Stratton Jan 27 '14 at 22:53

1 Answers1

4

RS-485 is not compatible with RS-232 in voltage levels, so you'll need either a USB-to-RS-485 or RS-232-to-RS-485 converter.

Beyond that, it's really impossible to say if it will work or not. The protocol might not be compatible since you are typically not controlling exactly when the RS-485 driver relinquishes the bus (it's usually done by some kind of timer in the unit).

You might have to add some kind of delays at one end or the other to allow that to happen properly. Usually it will work out of the box, but there is no guarantee that just because the voltage levels and baud rates are compatible that the protocol will be compatible.

With RS-485 data going both ways is transmitted on a single differential pair, so the possibility of collisions exists even with only two devices on the bus.

Here is a white paper that covers the issues.

SamGibson
  • 17,870
  • 5
  • 40
  • 59
Spehro Pefhany
  • 397,265
  • 22
  • 337
  • 893