Electrical – ADM2587 using input uart

microcontrollerrs485uart

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?

Best Answer

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.