Hardware manual

Both of these buffers are managed by the serial driver. But the driver does more than just dealing with these
buffers. It also does limited filtering (minor modifications) of data passing thru these buffers and listens for
control certain characters. All this is configurable using the Stty program.
4. Serial Port Basics
You don't have to understand the basics to use the serial port But understanding it may help to determine what
is wrong if you run into problems. This section not only presents new topics but also repeats some of what
was said in the previous section How the Hardware Transfers Bytes but in greater detail.
4.1 What is a Serial Port ?
Intro to Serial
The UART serial port (or just "serial port for short" is an I/O (Input/Output) device.
An I/O device is just a way to get data into and out of a computer. There are many types of I/O devices such
as the older serial ports and parallel ports, network cards, universal serial buses (USB), and firewire etc. Most
pre-2007 PC's have a serial port or two (on older PC's). Each has a 9-pin connector (sometimes 25-pin) on the
back of the computer. Computer programs can send data (bytes) to the transmit pin (output) and receive bytes
from the receive pin (input). The other pins are for control purposes and ground.
The serial port is much more than just a connector. It converts the data from parallel to serial and changes the
electrical representation of the data. Inside the computer, data bits flow in parallel (using many wires at the
same time). Serial flow is a stream of bits over a single wire (such as on the transmit or receive pin of the
serial connector). For the serial port to create such a flow, it must convert data from parallel (inside the
computer) to serial on the transmit pin (and conversely).
Most of the electronics of the serial port is found in a computer chip (or a part of a chip) known as a UART.
For more details on UARTs see the section What Are UARTS? But you may want to finish this section first
so that you will hopefully understand how the UART fits into the overall scheme of things.
Pins and Wires
Old PC's used 25 pin connectors but only about 9 pins were actually used so later on most connectors were
only 9-pin. Each of the 9 pins usually connects to a wire. Besides the two wires used for transmitting and
receiving data, another pin (wire) is signal ground. The voltage on any wire is measured with respect to this
ground. Thus the minimum number of wires to use for 2-way transmission of data is 3. Except that it has been
known to work with no signal ground wire but with degraded performance and sometimes with errors.
There are still more wires which are for control purposes (signalling) only and not for sending bytes. All of
these signals could have been shared on a single wire, but instead, there is a separate dedicated wire for every
type of signal. Some (or all) of these control wires are called "modem control lines". Modem control wires are
either in the asserted state (on) of +5 volts or in the negated state (off) of -5 volts. One of these wires is to
signal the computer to stop sending bytes out the serial port cable. Conversely, another wire signals the device
attached to the serial port to stop sending bytes to the computer. If the attached device is a modem, other wires
may tell the modem to hang up the telephone line or tell the computer that a connection has been made or that
the telephone line is ringing (someone is attempting to call in). See section Pinout and Signals for more
details.
Serial HOWTO
3.3 The Large Serial Buffers 11