End Function vc# public Int32 TerminationResistor Int32 desiredTerminationResistance, Int32 biasResistor Int32 terminationResistorReturn = 0; terminationResistorReturn = 2 * desiredTerminationResistance * biasResistor / 2 * biasResistor - desiredTerminationResistance ; return terminationResistorReturn; For example, if desiredTerminationResistance = 120 and biasResistor = 620, the function returns 133. Biasing circuits also increase the load on the line and thus reduce the allowed number of unit loads on the bus. 129 Chapter 7 Short-circuit Protection Another concern in RS-485 links is ensuring a logic-1 input if the network wires accidentally short together or if two drivers are enabled at the same time and hold the differential voltage near 0V. One solution is to use Maxim’s MAX3080. TIA-485-A says that receivers must recognize valid logic levels when the difference between inputs A and B is at least 200mV. The MAX3080’s receivers comply with the standard but expand the definition for logic 1 to include the range where input A is anywhere from 50 mV more negative to 200 mV more positive than input B. The only undefined range is when input A is between 50 mV and 200 mV more negative than input B. With these definitions, the receiver sees a logic 1 if the difference between inputs A and B is zero, which occurs if the RS-485 wires short together. A 0V input with up to 50 mV of noise remains a logic 1. Figure 7-11’s circuit uses 75ALS180B or MAX491 driver/receivers with a resistor network to provide fail-safe protection. The chips are full-duplex driver/receiver pairs, similar to the SN75179B introduced in Chapter 6 but with an enable line for each direction. Figure 7-11’s circuit is half duplex with the 2-wire interface created by tying the driver and receiver pairs together. Resistors R1 and R2 bias the line to a logic 1 if no driver is active, and R3 and + 5 V UP TO NODES NODE . NODES 32 TOTAL ONLY. RS-485 DIFFERENTIAL DR I VER/RECEIVER Figure 7-11: This prom-electric.ru