I'm trying to implement RS485 link between mcu and pc. I'm using MAX485 for testing my setup.
Question: I can not receive bytes if I use termination resistor. Why? How to solve this?
If I place a termination resistor (120 ohm), it is obvious that A-B pins are no longer high impedance. According to the datasheet, if A-B pins are not in high impedance, MAX485 ic's RO (Readout) is low while listening. If data line is low right before transmission starts, this sequence is not accepted as a valid sequence. That's why I can not receive any bytes if I use termination resistor.
I solved this problem by removing termination resistor. This put the MAX485 IC's A-B pins into a high impedance state, which turns RO pin (Pin #1, the TX pin of this IC) into high state while listening. Since the TX pin of this IC is high right before transmission starts, I can communicate as intended. But I know I will need to use termination resistor.
What is wrong with this setup?
- On the PC terminal screen, a key is pressed
- The USB/RS232 converter generates a sequence from its TX pin.
- STM32F407 receives this character, and simply echoes it via its TX pin.
- MAX485 ic receives this character, converts it a differential signal.
- Other MAX485 ic gets this differential signal and converts to the character.
- USB/RS232 converter gets this character via its RX pin.
- Received character is shown in the PC terminal screen.
Test case: Setup is correct if you can see pressed character in the terminal screen on the pc.
(I know I mixed the TTL levels and CMOS levels since I don't have appropriate IC's right now. Conversions made by resistors.)
This is my test circuit:
This is the truth table of MAX485: