old-www/LDP/nag2/x-087-2-serial.hardware.html

235 lines
5.8 KiB
HTML

<HTML
><HEAD
><TITLE
>Serial Hardware</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.57"><LINK
REL="HOME"
TITLE="Linux Network Administrators Guide"
HREF="index.html"><LINK
REL="UP"
TITLE="Configuring the Serial Hardware"
HREF="x-087-2-serial.html"><LINK
REL="PREVIOUS"
TITLE="Accessing Serial Devices"
HREF="x-087-2-serial.devices.html"><LINK
REL="NEXT"
TITLE="Using the Configuration Utilities"
HREF="x-087-2-serial-configuration.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Linux Network Administrators Guide</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x-087-2-serial.devices.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 4. Configuring the Serial Hardware</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x-087-2-serial-configuration.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="X-087-2-SERIAL.HARDWARE"
>4.4. Serial Hardware</A
></H1
><P
>RS-232 is currently the most common standard for serial communications
in the PC world. It uses a number of circuits for transmitting single
bits, as well as for synchronization. Additional lines may be used for
signaling the presence of a carrier (used by modems) and for
handshaking. Linux supports a wide variety of serial cards that use
the RS-232 standard.</P
><P
>
Hardware handshake is optional, but very
useful. It allows either of the two stations to signal whether it is
ready to receive more data, or if the other station should pause until
the receiver is done processing the incoming data. The lines used for
this are called &#8220;Clear to Send&#8221; (CTS) and &#8220;Ready to
Send&#8221; (RTS), respectively, which explains the colloquial name
for hardware handshake: &#8220;RTS/CTS.&#8221; The other type of
handshake you might be familiar with is called &#8220;XON/XOFF&#8221;
handshaking. XON/XOFF uses two nominated characters, conventionally
Ctrl-S and Ctrl-Q, to signal to the remote end that it should stop and
start transmitting data, respectively. While this method is simple to
implement and okay for use by dumb terminals, it causes great
confusion when you are dealing with binary data, as you may want to
transmit those characters as part of your data stream, and not have
them interpreted as flow control characters. It is also somewhat
slower to take effect than hardware handshake. Hardware handshake is
clean, fast, and recommended in preference to XON/XOFF when you have a
choice.</P
><P
>&#13;
In the original IBM PC, the RS-232 interface was driven by a UART chip
called the 8250. PCs around the time of the 486 used a newer version
of the UART called the 16450. It was slightly faster than the
8250. Nearly all Pentium-based machines have been supplied with an
even newer version of the UART called the 16550. Some brands (most
notably internal modems equipped with the Rockwell chip set) use
completely different chips that emulate the behavior of the 16550 and
can be treated similarly. Linux supports all of these in its standard
serial port driver.<A
NAME="X-087-2-SERIAL-FIXME"
HREF="#FTN.X-087-2-SERIAL-FIXME"
>[1]</A
>&#13;</P
><P
>The 16550 was a significant improvement over the 8250 and the 16450
because it offered a 16-byte FIFO buffer. The 16550 is actually a
family of UART devices, comprising the 16550, the 16550A, and the
16550AFN (later renamed PC16550DN). The differences relate to whether
the FIFO actually works; the 16550AFN is the one that is sure to
work. There was also an NS16550, but its FIFO never really worked
either.</P
><P
>The 8250 and 16450 UARTs had a simple 1-byte buffer. This means that a
16450 generates an interrupt for every character transmitted or
received. Each interrupt takes a short period of time to service, and
this small delay limits 16450s to a reliable maximum bit speed of
about 9,600 bps in a typical ISA bus machine.</P
><P
>In the default configuration, the kernel checks the four standard
serial ports, COM1: through COM4:. The kernel is also able to
automatically detect what UART is used for each of the standard serial
ports, and will make use of the enhanced FIFO buffer of the 16550, if
it is available.</P
></DIV
><H3
CLASS="FOOTNOTES"
>Notes</H3
><TABLE
BORDER="0"
CLASS="FOOTNOTES"
WIDTH="100%"
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="5%"
><A
NAME="FTN.X-087-2-SERIAL-FIXME"
HREF="x-087-2-serial.hardware.html#X-087-2-SERIAL-FIXME"
>[1]</A
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="95%"
><P
>Note that we are not talking about WinModem&#8482; here! WinModems
have very simple hardware and rely completely on the main CPU of your
computer instead of dedicated hardware to do all of the hard work. If
you're purchasing a modem, it is our strongest recommendation to
<I
CLASS="EMPHASIS"
>not</I
> purchase such a modem; get a real modem. You
may find Linux support for WinModems, but that makes them only a
marginally more attractive solution.</P
></TD
></TR
></TABLE
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x-087-2-serial.devices.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x-087-2-serial-configuration.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Accessing Serial Devices</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="x-087-2-serial.html"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Using the Configuration Utilities</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>