1
\$\begingroup\$

I have a design with the ADM2587 in half duplex mode: ADM2587 half duplex

If I want to receive something over RS485 I pull RE and DE low. This is tested and works good. The same thing with sending: RE and DE high, sending works, everybody is happy.

Now, sometimes I want to work directly with the UART on the board (the RX and TX lines feeding into the ADM2587). This is where stuff gets tricky. To use the UART, I have to do the opposite: for receiving I have to pull RE and DE high, for sending RE and DE low. If I do anything else the ADM seems to pull on it's RX and TX lines, and my microcontroller is not able to communicate properly.

Do I something wrong, or can ADM really not coexist with some other serial communication on it's input lines?? In my ideal dream world, I would have RE constantly low (enabling the receiver), and DE normally low to keep my uart communication on the board. Only if I want to send something out I would enable DE and send data over RS485.

But this results in chaos and mayhem. RS485 is not stable (many bit errors in communication due to wrong voltage levels) and UART doesn't work at all (I can see the received data on the lines, but the LOW voltage does only go to 3V, not all the way down to 0V).

Picture below: RX Signal on the microcontroller pin, RE LOW, DE LOW

RX Signal, RE low, DE low

Any ideas? how would one implement an "receive only" ADM25XX, where the lines are not held by the chip?

\$\endgroup\$
  • \$\begingroup\$ What do you mean, by "want to work directly with the UART" ? What type of device you want to connect to? Is it a simple UART port of other MCU or RS232 driver? Because in that case you wont be able to establish communication with such device using ADM2587. ADM2587 outputs will give you RS-485/422 balanced signal which is not compatible with RS232 or a typical UART lines of MCU (which are normally 3.3 or 5 V). \$\endgroup\$ – GAttuso Mar 21 '16 at 22:21
  • \$\begingroup\$ Maybe I have to add another drawing for clarification. For simplicity, assume another microcontroller UART port at the input of the ADM2587. \$\endgroup\$ – jwsc Mar 22 '16 at 7:46
1
\$\begingroup\$

In my ideal dream world, I would have RE constantly low (enabling the receiver), and DE normally low to keep my uart communication on the board. Only if I want to send something out I would enable DE and send data over RS485.

It is perfectly acceptable to have RE constantly low (tied to ground) and turn on DE only when you want to send something. In this case ADM2587 Receiver Output (RO) will be constantly on and will constantly track A and B lines. Your MCU Rx pin will receive everything that is transmitted on the bus including your own messages (echo).

Sometimes it can be very useful but as I understand it's not what you really want: you want to connect your MCU Rx line in parallel to some other MCU Tx line. In this case you will have 2 drivers (ADM2587 RO and other MCU Tx pin) connected to your MCU Rx pin, which is not good.

This is what you are seeing on the picture. You have a conflict: one driver (assume other MCU) is trying to send a bit (pull the voltage to LOW level), but at the same time another driver (ADM2587 RO pin) is not sending anything, that means it is trying to preserve HIGH output level.

The main problem here is that you need to ensure that only 1 driver in on at a time. To achieve your goal you need to disable both driver and receiver of ADM2587 at times when you want to do a parallel UART communication with other MCU. On the other hand you need to disable other MCU driver (put Tx pin in Z state) when you want to receive data from ADM2587.

It might work, but you need to have a full control of situation otherwise collisions are very possible.

\$\endgroup\$
  • \$\begingroup\$ Thank you very much for the clarification. I assumed that microcontrollers and the ADM would drive their lines with and open drain topology. I assumed pins would be high impedance during "HIGH" state and tied to GND during "LOW". This would result in a dominant state and connecting more RX and TX together would work. Sadly this appears to be not the case. Thanks however for the explanation. \$\endgroup\$ – jwsc Mar 23 '16 at 7:12
  • 1
    \$\begingroup\$ The related thread talks about connecting multiple Tx lines together. In the Maxim article they are suggesting addons to make it open drain, but that will probably be too much... Sometimes you can daisy chain MCU1 --> MCU2 --> RS485 driver-->MCU1. but it depends on your specific architecture. \$\endgroup\$ – GAttuso Mar 23 '16 at 20:33

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.