Serial Port Complete - Latest Microcontroller projects

(lily) #1
Designing RS-485 Links and Networks

much larger than the biasing current, the opposing bias current doesn’t change
the logic level the receiver sees.
The biasing resistors and the parallel combination of the terminating resistors
and the receivers’ inputs form a voltage divider. Smaller biasing resistors
increase the noise margin but also increase power consumption. With larger ter-
mination values, the biasing resistors can be a little larger. A 3V supply requires
smaller values.
For an exact match, the termination at the node with the biasing resistors
should be slightly greater than the line’s characteristic impedance, as in Figure
7-10. At the node with the biasing resistors, the terminating resistance equals
the terminating resistor in parallel with the series combination of the biasing
resistors. The function below accepts a desired termination resistance and a
value for the bias resistors and returns the value to use for the termination resis-
tor at the node with the biasing resistors. All values are in ohms:

 Public Function TerminationResistor
(ByVal desiredTerminationResistance As Integer,

ByVal biasResistor As Integer) As Integer


TerminationResistor = _
(2 * desiredTerminationResistance * biasResistor) / _
((2 * biasResistor) - desiredTerminationResistance)
End Function

 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.
Free download pdf