0
\$\begingroup\$

I'm new in communication protocols and ICs. I would like to know if it is possible to connect a RS-232 (TX, RX and GND) to a RS-485 (Vcc, A, B and GND). I only need a half-duplex communication. The problem that I'm strolling around is that I need to enable/disable the RE and DE pins, to ensure bidirectional communication. How should I detect automatically the time to set RE or DE?

I want to design a PCB with a similar functionality as the transceiver below:

RS-232 to RS-485 Transceiver

Does anyone have suggestions?

\$\endgroup\$
  • \$\begingroup\$ chinese converters have some delay circuit made from capacitor and logic gates, the straightforward implementation is to use RTS to toggle TX enable. But what is your purpose? It an embedded solution? And, nobody knows whats inside the box in the picture. \$\endgroup\$ – Marko Buršič Oct 17 at 16:56
  • \$\begingroup\$ Between which two devices? If one of them is a PC, it might be simpler to get a USB-to-serial adapter that talks the required interface directly. \$\endgroup\$ – Justme Oct 17 at 23:59
  • \$\begingroup\$ Thanks for the help! @MarkoBuršič I don´t have available the RTS pin. The purpose is to connect a master and a slave that communicates in different protocol. The master send a query and waits for the response of the slave. In the middle is the solution that I want do design, I already tried with some chineses RS232-RS485 and every think works fine, but i want to do my transceiver. Thanks! \$\endgroup\$ – Luís Filipe Oct 18 at 7:26
0
\$\begingroup\$

RS-232 is single-ended, meaning that the signal is referenced to the ground, while RS-485 is differential - signal is referenced between A and B. That's before we even talk about TE/RE(DE) signalling of half-duplex.

What you need is a signal converter between single-ended (UART/RS232) to differential to even start communicating. Whether you implement it yourself or use readymade ICs, is up to you.

If you already have converter, by default you sit with RE only and listen to the bus. Implement some sort of addressing, so that your device responds only when addressed. Only once addressed, you actually enable TE and transmit. Once done with transmit, get back to listen-only mode. Addressing/strict protocol is the only way to prevent bus clashes in buses without dedicated chip-selects.

Edit:

If you want your RE/DE triggered by the data bus, you'll need some sort of timed flip-flop, that gets set by your start bit and reset using a simple timing circuit, that acts as a watchdog for TX line. This will control your RE/DE. Then you need to delay your signal until your transceiver actually enables transmission.

\$\endgroup\$
  • \$\begingroup\$ thanks for the answer. I already see some circuits with RC that enables de RE/DE. I would like to know if there are any IC that implements directly RS232 to RS485. \$\endgroup\$ – Luís Filipe Oct 18 at 13:10
  • \$\begingroup\$ Haven't seen any and I doubt that there's a large market for that. Everybody just designs around what's out there \$\endgroup\$ – stiebrs Oct 18 at 13:18

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.