Serial port
In computing, a serial port is a serial communication
physical interface through which information transfers in or out one bit at a
time (in contrast to a parallel port).[1] Throughout most of the history of
personal computers, data was transferred through serial ports to devices such
as modems, terminals and various peripherals.
While such interfaces as Ethernet, FireWire, and USB all
send data as a serialstream, the term "serial port" usually
identifies hardware more or less compliant to the RS-232 standard, intended to
interface with a modem or with a similar communication device.
Modern computers without serial ports may require
serial-to-USB converters to allow compatibility with RS 232 serial devices.
Serial ports are still used in applications such as industrial automation
systems, scientific instruments, point of sale systems and some industrial and
consumer products. Server computers may use a serial port as a control console
for diagnostics. Network equipment (such as routers and switches) often use
serial console for configuration. Serial ports are still used in these areas as
they are simple, cheap and their console functions are highly standardized and
widespread. A serial port requires very little supporting software from the
host system.
Contents
• 1
Hardware
o 1.1 DTE
and DCE
o 1.2
Connectors
o 1.3
Pinouts
o 1.4
Hardware abstraction
• 2 Common
applications for serial ports
• 3
Settings
o 3.1 Speed
o 3.2 Data
bits
o 3.3
Parity
o 3.4 Stop
bits
o 3.5
Conventional notation
o 3.6 Flow
control
• 4 "Virtual"
serial ports
• 5 See
also
• 6
References
• 7 Further
reading
• 8
External links
Hardware
Some computers, such as the IBM PC, used an integrated
circuit called a UART, that converted characters to (and from) asynchronous
serial form, and automatically looked after the timing and framing of data.
Very low-cost systems, such as some early home computers, would instead use the
CPU to send the data through anoutput pin, using the bit-banging technique.
Before large-scale integration (LSI) UART integrated circuits were common, a
minicomputer or microcomputer would have a serial port made of multiple
small-scale integrated circuits to implement shift registers, logic gates,
counters, and all the other logic for a serial port.
Early home computers often had proprietary serial ports with
pinouts and voltage levels incompatible with RS-232. Inter-operation with
RS-232 devices may be impossible as the serial port cannot withstand the
voltage levels produced and may have other differences that "lock in"
the user to products of a particular manufacturer.
Low-cost processors now allow higher-speed, but more
complex, serial communication standards such as USB and FireWireto replace
RS-232. These make it possible to connect devices that would not have operated
feasibly over slower serial connections, such as mass storage, sound, and video
devices.
Many personal computer motherboards still have at least one
serial port, even if accessible only through a pin header. Small-form-factor
systems and laptops may omit RS-232 connector ports to conserve space, but the
electronics are still there. RS-232 has been standard for so long that the
circuits needed to control a serial port became very cheap and often exist on a
single chip, sometimes also with circuitry for a parallel port.
DTE and DCE
The individual signals on a serial port are unidirectional
and when connecting two devices the outputs of one device must be connected to
the inputs of the other. Devices are divided into two categories "data
terminal equipment" (DTE) and "data circuit-terminating
equipment" (DCE). A line that is an output on a DTE device is an input on
a DCE device and vice versa so a DCE device can be connected to a DTE device
with a straight wired cable. Conventionally, computers and terminals are DTE
while modems and peripherals are DCE.
If it is necessary to connect two DTE devices (or two DCE
devices but that is more unusual) a cross-over null modem, in the form of
either an adapter or a cable, must be used.
Connectors
While the RS-232 standard originally specified a 25-pin
D-type connector, many designers of personal computers chose to implement only
a subset of the full standard: they traded off compatibility with the standard
against the use of less costly and more compact connectors (in particular the
DE-9 version used by the original IBM PC-AT). The desire to supply serial
interface cards with two ports required that IBM reduce the size of the
connector to fit onto a single card back panel. A DE-9 connector also fits onto
a card with a second DB-25 connector that was similarly changed from the
original Centronics-style connector. Starting around the time of the
introduction of the IBM PC-AT, serial ports were commonly built with a 9-pin
connector to save cost and space. However, presence of a 9-pin D-subminiature connector
is not sufficient to indicate the connection is in fact a serial port, since
this connector was also used for video, joysticks, and other purposes.
Some miniaturized electronics, particularly graphing
calculators and hand-heldamateur and two-way radio equipment, have serial ports
using a phone connector, usually the smaller 2.5 or 3.5 mm connectors and use
the most basic 3-wire interface.
Many models of Macintosh favored the related RS-422
standard, mostly using German Mini-DIN connectors, except in the earliest
models. The Macintosh included a standard set of two ports for connection to a
printer and a modem, but somePowerBook laptops had only one combined port to
save space.
The standard specifies 20 different signal connections.
Since most devices use only a few signals, smaller connectors can often be
used. For example, the 9-pin DE-9 connector was used by most IBM-compatible PCs
since the IBM PC AT, and has been standardized as TIA-574. More recently,
modular connectors have been used. Most common are 8P8C connectors. Standard
EIA/TIA 561 specifies a pin assignment, but the "Yost Serial Device Wiring
Standard"[2] invented by Dave Yost (and popularized by the Unix System
Administration Handbook) is common on Unixcomputers and newer devices from Cisco
Systems. Many devices don't use either of these standards. 10P10C connectors
can be found on some devices as well. Digital Equipment Corporation defined
their own DECconnect connection system which was based on the Modified Modular
Jack (MMJ) connector. This is a 6-pin modular jack where the key is offset from
the center position. As with the Yost standard, DECconnect uses a symmetrical
pin layout which enables the direct connection between two DTEs. Another common
connector is the DH10 header connector common on motherboards and add-in cards
which is usually converted via a cable to the more standard 9-pin DE-9
connector (and frequently mounted on a free slot plate or other part of the
housing).
Pinouts
The following table lists commonly used RS-232 signals and
pin assignments.[3]
Signal Origin DB-25
DE-9
(TIA-574)
MMJ
8P8C ("RJ45")
10P10C ("RJ50")
Name Abbreviation DTE
DCE
EIA/TIA-561
Yost (DTE) Yost
(DCE) Cyclades[4]
Digi(ALTPIN option)[5]
National Instruments[6]
Cyclades[4]
Digi[7]
Transmitted Data TxD ? 2 3 2 6 6 3 3 4 8 4 5
Received Data RxD ? 3 2 5 5 3 6 6 5 9 7 6
Data Terminal Ready DTR ? 20 4 1 3 7 2 2 8 7 3 9
Data Carrier Detect DCD ? 8 1 N/A 2 2 7 7 1 10 8 10
Data Set Ready DSR ? 6 6 6 1 8 N/A 5 9 2
Ring Indicator RI ? 22 9 N/A N/A N/A N/A N/A 2 10 1
Request To Send RTS ? 4 7 N/A 8 8 1 1 2 4 2 3
Clear To Send CTS ? 5 8 N/A 7 1 8 5 7 3 6 8
Signal Ground G common 7 5 3,4 4 4,5 4,5 4 6 6 5 7
Protective Ground PG common 1 N/A N/A N/A N/A N/A N/A 3 N/A 1 4
The signals are named from the standpoint of the DTE, for
example, an IBM-PC compatible serial port. The ground signal is a common return
for the other connections; it appears on two pins in the Yost standard but is
the same signal. The DB-25 connector includes a second "protective
ground" on pin 1. Connecting this to pin 7 (signal reference ground) is a
common practice but not essential.
Note that EIA/TIA 561 combines DSR and RI,[8][9] and the
Yost standard combines DSR and DCD.
Hardware abstraction
Operating systems usually use a symbolic name to refer to
the serial ports of a computer. Unix-like operating systems usually label the
serial port devices/dev/tty* (TTY is a common trademark-free abbreviation for
teletype) where *represents a string identifying the terminal device; the
syntax of that string depends on the operating system and the device. On Linux,
8250/16550 UARThardware serial ports are named /dev/ttyS*, USB adapters appear
as/dev/ttyUSB* and various types of virtual serial ports do not necessarily
have names starting with tty.
The Microsoft MS-DOS and Windows environments refer to
serial ports as COMports: COM1, COM2,..etc. Ports numbered greater than COM9
should be referred to using the \\.\COM10 syntax.[10]
Common applications for serial ports
The RS-232 standard is used by many specialized and
custom-built devices. This list includes some of the more common devices that
are connected to the serial port on a PC. Some of these such as modems and
serial mice are falling into disuse while others are readily available.
Serial ports are very common on most types of
microcontroller, where they can be used to communicate with a PC or other
serial devices.
• Dial-up
modems
• Configuration
and management of networking equipment such as routers, switches, firewalls,
load balancers
• GPS
receivers (typically NMEA 0183 at 4,800 bit/s)
• Bar code
scanners and other point of sale devices
• LED and
LCD text displays
• Satellite
phones, low-speed satellite modems and other satellite based transceiver devices
• Flat-screen
(LCD and Plasma) monitors to control screen functions by external computer,
other AV components or remotes
• Test and
measuring equipment such as digital multimeters and weighing systems
• Updating
firmware on various consumer devices.
• Some CNC
controllers
• Uninterruptible
power supply
• Stenography
or Stenotype machines.
• Software
debuggers that run on a second computer.
• Industrial
field buses
• Printers
• Computer
terminal, teletype
• Older
digital cameras
• Networking
(Macintosh AppleTalk using RS-422 at 230.4 kbit/s)
• Serial
mouse
• Older GSM
mobile phones
• Some
Telescopes
• IDE hard
drive[11][12] repair[13][14]
Since the control signals for a serial port can be easily
turned on and off by a switch, some applications used the control lines of a
serial port to monitor external devices, without exchanging serial data. A
common commercial application of this principle was for some models of
uninterruptible power supply which used the control lines to signal "loss
of power", "battery low alarm" and other status information. At
least some Morse code training software used a code key connected to the serial
port, to simulate actual code use. The status bits of the serial port could be
sampled very rapidly and at predictable times, making it possible for the
software to decipher Morse code.

No comments:
Post a Comment