Serial Port Complete - Latest Microcontroller projects

(lily) #1

Chapter 7


 Public Function IsLongLine
(ByVal propagationRate As Integer,

ByVal cableLength As Integer,
ByVal driverRiseTime As Integer)

As Boolean


If (propagationRate * cableLength * 12) > _
(driverRiseTime * 1000 / 2) Then
IsLongLine = True
Else
IsLongLine = False
End If

End Function

 public bool IsLongLine(Int32 propagationRate, Int32 cableLength, Int32 driverRiseTime)
{
bool IsLongLineReturn = false;


if ((propagationRate * cableLength * 12) > (driverRiseTime * 1000 / 2))
{
IsLongLineReturn = true;
}
else
{
IsLongLineReturn = false;
}

return IsLongLineReturn;
}
The function below returns the maximum length of a short line (lumped sys-
tem) for a specific propagation rate and rise time. The variables are the propaga-
tion rate in ps/in. (propagationRate), the driver rise time in ns/in.
(driverRiseTime), and the maximum length of a short line in ft (Maximum-
LengthOfShortLine.
Free download pdf