4
\$\begingroup\$

I have 2 pins and primary function should be A/B RS485, but is possible that I also put RS232 (Rx/Tx) chip on same bus and then control which one I want to use from microcontroller.

I was thinking about MAX232 and MAX481 and enabling and disabling them trough power on/off controlled by microcontroller driving transistor.

Is there any single device that does this?

\$\endgroup\$
  • 1
    \$\begingroup\$ There is Maxim part that is a dual mode transceiver, using a logic input to choose whether it is RS-232 or RS-485. I've used it in several designs, but I can't recall the part number off the cuff. It is possible that merely knowing that such a thing exists will help you find it, but I'll try to remember to dig up the number when I'm back in my office later. \$\endgroup\$ – RBerteig Nov 2 '11 at 8:32
7
\$\begingroup\$

Exar has the SP331 programmable RS-232/RS-485 transceiver which may suit your needs.

\$\endgroup\$
  • 5
    \$\begingroup\$ I added the manufacturer name and part number so that if the URL ever gets moved, there is at least some contextual information to go by in this post. Please consider this approach when posting links to datasheets. \$\endgroup\$ – Adam Lawrence Jul 20 '11 at 16:31
6
\$\begingroup\$

Since you like parts from Maxim now, take a look at the Maxim MAX3160 and friends. They provide transceivers for both RS-232 and RS-485 protocols, allowing the protocol to be chosen at run time by driving a logic level input.

We are using the MAX3161 in a couple of projects which provide only a three contact terminal strip for field wiring the serial cable (Rx/A+, Tx/B-, Gnd). If the port is incorrectly configured the device is still safe because, unlike most RS-422 receivers, it tolerates the full range of RS-232 voltages on the pins regardless of which protocol is currently selected.

This part is a little more expensive than a pair of individual protocol drivers, but makes up for that in saved board area and saved complexity.

\$\endgroup\$
  • \$\begingroup\$ and dear Rberteig, Can we do the same thing with a Max3160 ? I would like to have a teminal chip with 3 contacts : RX,TX and GND for RS232, and A,B, GND for RS485 ( half duplex mode ). But it seems that we can't do it with a MAX3160 because pin 13 and pin 14 are disconnected if HALF DUPLEX is ENABLE. Can you provide a schematic ? Best Regards, \$\endgroup\$ – user19209 Feb 20 '13 at 8:05
  • \$\begingroup\$ @user19209, As I recall, we started the first design with the MAX3160 in mind, then discovered effectively the same issue which is why we moved to the MAX3161. \$\endgroup\$ – RBerteig Feb 21 '13 at 21:49
5
\$\begingroup\$

You should not connect ordinary RS485 drivers (e.g MAX481) onto the same wires as RS232, because the negative RS232 voltages can easily exceed the -8V abs-max for the MAX481.

If you can't use the suggested combined part, you'll need to check the specs of the RS485 part you do use very carefully for compatibility with RS232. Or use some kind of switching, of course.

\$\endgroup\$
  • 1
    \$\begingroup\$ An even more important caveat than the one posed by jpc! \$\endgroup\$ – Kevin Vermeer Jul 22 '11 at 0:04
3
\$\begingroup\$

Powering a device down may cause its ESD diodes to start conducting current from the data lines, allowing some power to pass through into Vcc. You should use an RS232 transceiver with an ENABLE line.

With RS485 it is simpler, any chip with separate DE and RE (driver and receiver enable) will do.

\$\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.