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?
History:
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?
Circuit Behaviour:
- 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:

For what it's worth, Maxim's spec sheet shows differential voltages of around +/- 0.8V with 120 ohm terminating resistors (and 4000 ft of cable).
What voltage are you running the MAX485's from?
– gwideman Mar 21 '14 at 08:57Without term resistors, is the data you receive on the PC the correct data, or just some data?
What do you mean by "Max485 IC's RO pin (TX pin)". Which 485? and which pin?
– gwideman Mar 21 '14 at 08:58I used 330 ohm, measured with a ohmmeter. It also breaks the communication. A 22K only disturbs the line, neither allows, nor breaks. But the twisted pair cable is hand made (for testing purposes), does it matter?
Without term resistors, I get correct data. I mean pin number 1 by "Max485's RO pin (TX pin)".
– ceremcem Mar 21 '14 at 09:53