max485 test circuit
The MAX485 is a half-duplex RS-485 transceiver. That means that only one transmitter can be active at a time on the bus, but all receivers can be enabled.
Obviously, this requires a protocol. Typically, a device designated a master requests or sends data from/ to slaves. The slaves are identified by an address. The slaves must start transmitting their replies only if their address was specified and only after the master has finished its message.
As you can see, a very specific and clear protocol needs to be implemented in all devices. And you should realize that most of the time the bus is actually idle.
The bus is idle with B high and A low, pulled up/ high by the biasing resistors. So unless you check the signals with a scope, you will always measure close to 0V on the A line and close to 5V on the B line.
The drivers are enabled just before the transmission, by taking the DE (Driver Enable) line high. This snould only happen on the transmitting node. Then the node transmits its data, as a short burst and then releases the bus by driving the DE line low.
While transmitting, the A line copies the state of the DI (Data Input) line, while the B output transmits the complement of DI.
The receivers can be permanently enabled if line /RE (/Receiver Enable) is tied low, or they can be enabled only when needed. However, the /RE only tristates the RO line (Receiver Output), that is on the microcontroller side. It does notthing on the bus side. Typically, the receivers are enabled all the time and all the slaves "listen" and check if their address is being received, followed by other instructions, etc, depending on the protocol.
To summarize, the voltages you measure seem OK. Check with a scope for bursts of data. Ensure you have a master in the systemand that at least it is transmitting something.
One more thing: the bus is a differential one, but the grounds of the devices connected to the bus must be within a few volts of each other (max. 7V difference).
For additional info, check this out:
https://focus.ti.com/docs/apps/catalog/resources/appnoteabstract.jhtml?abstractName=slla166