Documents
Resources
Learning Center
Upload
Plans & pricing Sign in
Sign Out

Computer Peripheral

VIEWS: 80 PAGES: 43

									PS/2 connector MiniDIN-6 Connector

The PS/2 connector is a 6-pin Mini-DIN connector used for connecting some keyboards and
mice to a PC compatible computer system. Its name comes from the IBM Personal System/2
series of personal computers, with which it was introduced in 1987. The PS/2 mouse connector
generally replaced the older DE-9 RS-232 "serial mouse" connector, while the PS/2 keyboard
connector replaced the larger 5-pin/180° DIN connector used in the IBM PC/AT design. The
PS/2 designs on keyboard and mouse interfaces are electrically similar and employ the same
communication protocol. However, a given system's keyboard and mouse port may not be
interchangeable since the two devices use a different set of commands.


Contents
1.        Port availability
     o           1.1 Legacy port status and USB
2.        2 Color code
3.        3 Software issues
4.        4 Hardware issues
     o           4.1 Hotplugging
     o           4.2 Durability
     o           4.3 Fault isolation
5.        5 See also
6.        6 References
7.        7 External links




         The color-coded PS/2 connection ports (purple for
                  keyboards and green for mice)
   Type    Keyboard and computer mouse data connector


                            Data


   Data     Serial data at 10 to 16 kHz with 1 stop bit, 1
  signal    start bit, 1 parity bit


File:MiniDIN-6 Connector Pinout.svg




              Female connector from the front


   Pin 1   +DATA                      Data
   Pin 2   Not connected       Not connected*


   Pin 3   GND                 Ground


   Pin 4   Vcc                 +5 V DC at 275 mA


   Pin 5   +CLK                Clock


   Pin 6   Not connected       Not connected**


     * On some computers mouse data for splitter cable



Port availability
When IBM-compatible PCs widely used the Intel 80386 and 486 processors, the connectors were
also seen on some PC clones with non-standard case designs, and the PS/2 mouse connector was
sometimes seen on a separate backplate on systems using a standard AT case. However, PS/2
ports only became the norm much later with the introduction of the ATX form factor during
1993–97. The design decision for identical but incompatible connectors would prove aggravating
to consumers; manufacturers would later adopt a standardized color code.

Old laptops generally have a single port that supports either a keyboard or a mouse. Sometimes
the port also allows one of the devices to be connected to the two normally unused pins in the
connector to allow both to be connected at once through a special splitter cable.[1] This
configuration is common on IBM/Lenovo Thinkpad notebooks among many others.

The PS/2 keyboard interface was electrically the same as the 5-pin AT system, and keyboards
designed for one can be connected to the other with a simple wiring adapter. The PS/2 mouse
interface is substantially different from RS-232 (which was generally used for mice on PCs
without PS/2 ports), but nonetheless many mice were made that could operate on both with a
simple wiring adapter.

PS/2 mouse and keyboard connectors have also been used in non-IBM PC-compatible computer
systems, such as the DEC AlphaStation line, early IBM RS/6000 CHRP machines and SGI Indy,
Indigo 2, and newer (Octane etc.) computers.[2] Various Macintosh clone computers from the late
90s featured PS/2 mouse and keyboard ports, including the Motorola StarMax and the Power
Computing PowerBase[3]

[edit] Legacy port status and USB
PS/2 was considered a legacy port by the Intel/Microsoft PC 2001 specification of 2000,
preferring to connect keyboards and mice via USB ports. Despite this, PS/2 ports are included on
most new motherboards.[4] These PS/2 ports cause fewer problems when KVM switching with
non-Wintel systems.[citation needed] PS/2 ports may also be favored for security reasons in a
corporate environment. Use of PS/2 ports for keyboard and mouse connectivity would allow
USB ports to be totally disabled, preventing the connection of any USB removable disks. Also
with high-end keyboards only way to provide full n-key rollover is by using PS/2, as USB has
cap of 6 keys plus modifiers at the same time.[5]

Many keyboards and mice can connect via either USB or PS/2, selecting the appropriate protocol
at power-on. Such devices are generally equipped with a USB connector, and ship with a simple
wiring adapter to allow connection to a PS/2 port. Older PS/2-only peripherals can be connected
to a USB port via an active adapter, which generally provides a pair of PS/2 ports at the cost of
one USB port.

[edit] Color code
Original PS/2 connectors were black or had the same color as the connecting cable (mainly
white). Later the PC 97 standard introduced a color code: the keyboard port, and the plugs on
compliant keyboards, were purple; mouse ports and plugs were green. Some vendors initially
used a different color code: Logitech used the color orange for the keyboard connector for a short
period, but soon switched to purple.[citation needed] Today this code is still used on most PCs. The
pinouts of the connectors are the same, but most computers will not recognize devices connected
to the wrong port.

Color Description
Purple Keyboard
Green Mouse

Wiring inside keyboard cable varies widely. Here are some more common color codes, but the
reader is cautioned that the only reliable method of determining color assignment is to confirm
by measuring continuity to the connector.

Description Common Alternate Alternate Alternate Alternate Alternate Alternate
+CLK         Green  Blue      White     Yellow White        Blue      Yellow
Data         White  Yellow Green        Red       Green     Yellow Gray
GND          Yellow Black     Orange Gray         Black     White     Black
Vcc          Red    Red       Blue      Brown     Red       Orange Red

Software issues
As of 2010, version 8.0 of Microsoft's keyboard and mice drivers no longer supports PS/2 (even
with USB adapters) in its supported keyboards and supported mice.[citation needed]
Hotplugging

PS/2 ports are designed to connect the digital I/O lines of the microcontroller in the external
device directly to the digital lines of the microcontroller on the motherboard. They are not
designed to be hot swappable. Hot swapping PS/2 devices usually does not cause damage
because more modern microcontrollers tend to have more robust I/O lines built into them which
are harder to damage than those of older controllers; however, hot swapping can still potentially
cause damage on older machines, or machines with less robust port implementations.

If they are hot swapped, the devices must be similar enough that the driver running on the host
system recognizes, and can be used with the new device. Otherwise, the new device will not
function properly. While this is seldom an issue with standard keyboard devices, the host system
rarely recognizes the new device attached to the PS/2 mouse port. In practice most keyboards can
be hot swapped but this should be avoided.

[edit] Durability

PS/2 connectors are not designed to be plugged in and out very often, which can easily lead to
bent or broken pins. PS/2 connectors only insert in one direction and must be rotated correctly
before attempting connection. Most but not all connectors include an arrow or flat section which
is usually aligned to the right or top of the jack before being plugged in. The exact direction may
vary on older or non-ATX computers and care should be taken to avoid damage or bent pins
when connecting devices. This issue is slightly alleviated in modern times with the advent of the
PS/2 to USB adapter. Users can just leave the PS/2 plugged into the USB at all times and not risk
damaging the pins this way.

[edit] Fault isolation

As noted, in a standard implementation both PS/2 ports are usually controlled by a single
microcontroller on the motherboard. This makes design and manufacturing extremely simple and
cheap. However, a rare side effect of this design is that a malfunctioning device can cause the
controller to become confused, resulting in "both" devices acting erratically. The resulting
problems can be difficult to troubleshoot (e.g. a bad mouse can cause problems that appear to be
the fault of the keyboard).

A way to isolate the problem is to use a USB keyboard or mouse to determine which of the
devices is at fault. A USB to PS/2 adapter can also be used to connect either of the devices to a
USB port but the result can be undetermined because PS/2 and USB ports can use different
voltages. Quality USB to PS/2 adapters have an integrated circuit that compensates the PS/2 -
USB port voltage differences. Due to this difference it is recommend to avoid cheap adapters or
try using a USB Keyboard or Mouse when troubleshooting PS/2 related errors.

D-subminiature
From Wikipedia, the free encyclopedia
 (Redirected from DE-9 connector)

Jump to: navigation, search

         This article has multiple issues. Please help improve it or discuss these issues on the talk page.

                It needs additional citations for verification. Tagged since August 2010.
                It may contain original research. Tagged since August 2010.




DA, DB, DC, DD, and DE sized connectors

The D-subminiature or D-sub is a common type of electrical connector. They are named for
their characteristic D-shaped metal shield. When they were introduced, D-subs were among the
smaller connectors used on computer systems.[citation needed]


Contents
       1 Description, nomenclature, and variants
       2 Typical applications
    o           2.1 Communications ports
    o           2.2 Network ports
    o           2.3 Computer video output
    o           2.4 Game controller ports
    o           2.5 Other
       3 Wire-contact attachment types
       4 Usage
       5 See also
       6 References
       7 External links
[edit] Description, nomenclature, and variants




The DB13W3 Connector with 3 coaxial connections and ten ordinary pins




A diagram of a DE9 plug




Male 13W3 Plug
DE-15F, used for VGA, SVGA and XGA ports

A D-sub contains two or more parallel rows of pins or sockets usually surrounded by a D-shaped
metal shield that provides mechanical support, ensures correct orientation, and may screen
against electromagnetic interference. The part containing pin contacts is called the male
connector or plug, while that containing socket contacts is called the female connector or socket.
The socket's shield fits tightly inside the plug's shield. The plug also may have screws on either
side of the shield that fasten into holes in the socket (although sometimes the screws are on the
socket: see the DE9 pictured to the left). When screened cables are used, the shields are
connected to the overall screens of the cables. This creates an electrically continuous screen
covering the whole cable and connector system.

The D-sub series of connectors was invented by ITT Cannon, part of ITT Corporation, in 1952.[1]
Cannon's part-numbering system uses D as the prefix for the whole series, followed by one of A,
B, C, D, or E denoting the shell size, followed by the number of pins or sockets, followed by
either P (plug) or S (socket) denoting the gender of the part. Each shell size usually (see below
for exceptions) corresponds to a certain number of pins or sockets: A with 15, B with 25, C with
37, D with 50, and E with 9.[2] For example, DB25 denotes a D-sub with a 25-position shell size
and a 25-position contact configuration. The contacts in either row of these connectors are
spaced 326/3000 of an inch apart, or approximately 0.109 inches (2.77 mm), and the rows are
spaced 0.112 inches (2.84 mm) apart (the pins in the two rows are offset by half the distance
between adjacent contacts in a row).[3] The suffixes M and F (for male and female) are
sometimes used instead of the original P and S.

This naming pattern is not always followed, however. Because personal computers first used
DB25 connectors for their serial and parallel ports, when the PC serial port began to use 9-pin
connectors, they were often labeled as DB9 instead of DE9 connectors, due to an ignorance of
the fact that B represented a shell size. It is now common to see DE9 connectors sold as DB9
connectors. DB9 nearly always refers to a 9-pin connector with an E size shell. The non-standard
23-pin D-sub connectors for external floppy drives and video output on most of the Amiga
computers are usually labeled DB23, even though their shell size is two pins smaller than
ordinary DB sockets.

There are now D-sub connectors which have the original shell sizes, but more pins, and their
names follow the same pattern. For example, the DE15, usually found in VGA cables, has 15
pins in three rows, all surrounded by an E size shell. The pins are spaced at 0.090 inches
(2.3 mm) horizontally and 0.078 inches (2.0 mm) vertically.[3]) The other connectors with the
same pin spacing are the DE15, DA26, DB44, DC62, and DD78. Reflecting the same confusion
of the letters DB with just D as mentioned above, these connectors are also often called DB15HD
(or even DB15 or HD15), DB26HD, DB44HD, DB62HD, and DB78HD connectors,
respectively, where HD stands for "high density". They all have three rows of pins, except the
DD78, which has four. The "double density" series of D-sub connectors features even denser
arrangements and consists of the DE19, DA31, DB52, DC79, and DD100. These each have four
rows of pins.
Cannon also produced "hybrid" D-subs with larger contacts in place of some of the normal
contacts that could be used for high-current, high-voltage, or co-axial inserts. The DB13W3
variant was commonly used for high-performance video connections; this variant provided 10
regular (#20) pins plus three coaxial contacts for the red, green, and blue video signals. Hybrid
D-subs are currently being manufactured in a broad range of configurations by other companies,
including Amphenol, Conec, Teledyne Reynolds, Assmann Electronics, Norcomp, Cinch, 3M,
and Tyco. Some variants have current ratings up to 40A or operating voltages as high as
13,500V; others are waterproof and meet IP67 standards.

A smaller type of connector derived from the D-sub is called the microminiature D, or micro-D,
which is a trademark of ITT Cannon. It is about half the length of a D-sub.

There is yet another similar family of connectors that is easy to confuse with the D-sub family.
These connectors have names like HD50 and HD68, and have a D-shaped shell that is about half
the width of a DB25. They are common in SCSI attachments.

The original D-sub connectors are now defined by an international standard, IEC 60807-3 /
DIN 41652. The United States military also maintains another specification for D-subminiature
connectors, the MIL-DTL-24308 standard.[3]

[edit] Typical applications




D-sub connectors.
The connector on the left is a 9-pin male (DE9M) connector plug, and the one on the right is a 25-pin
female (DB25F) socket. The hexagonal pillars (4-40 bolt) at either end of each connector have a
threaded stud (not visible) that passes through flanges on the connector, fastening it to the metal panel.
They also have a threaded hole that receives the jackscrews on the cable shell, to hold the plug and
socket together.

[edit] Communications ports

The widest application of D-subs is for RS-232 serial communications, though the standard did
not make this connector mandatory. RS-232 devices originally used the DB25, but for many
applications the less common signals were omitted, allowing a DE9 to be used. The standard
specifies a male connector for terminal equipment and a female connector for modems, but many
variations exist. IBM PC-compatible computers tend to have male connectors at the device and
female connectors at the modems. Early Apple Macintosh models used DE9 connectors for RS-
422 serial interfaces (which can operate as RS-232). Later Macintosh models use 8-pin miniature
DIN connectors instead.

On PCs, 25-pin and (beginning with the IBM-PC/AT) 9-pin plugs are used for the RS-232 serial
ports; 25-pin sockets are used for the parallel printer ports (instead of the Centronics socket
found on the printer itself).

Many uninterruptible power supply units have a DE9F connector on them in order to signal to
the attached computer via an RS-232 interface. Often these do not send data serially to the
computer but instead use the handshaking control lines to indicate low battery, power failure, or
other conditions. Such usage is not standardized between manufacturers and may require special
cables.

[edit] Network ports

DE9 connectors were used for some token ring networks as well as other computer networks.

The Attachment Unit Interfaces that were used with 10BASE5 "thick net" in the 1980s and
1990s used DA15 connectors for connectivity between the Medium Attachment Units and
(Ethernet) network interface cards, albeit with a sliding latch to lock the connectors together
instead of the usual hex studs with threaded holes. (The sliding latch was intended to be quicker
to engage and disengage and to work in places where jack screws could not be used for reasons
of component shape.

[edit] Computer video output




A male DE9 connector.

A female 9-pin connector on an IBM compatible personal computer may be a video display
output such as MDA, Hercules, CGA, or EGA (rarely VGA or others). Even though these all use
the same DE9 connector, the displays cannot all be interchanged and monitors or video
interfaces may even be damaged if connected to an incompatible device using the same
connector.

Later analog video (VGA and later) adapters generally replaced these connectors with DE15
high-density sockets (though some early VGA devices still used DE9 connectors). DE15
connectors are similar to DE9 connectors (see above).

Many Apple Macintosh models (beginning with the Macintosh II) used DA15 sockets for
analogue RGB video out. Just prior to this, the Apple IIgs used the same connector for the same
purpose, but in a non-compatible way. A digital (and thus also incompatible) RGB adapter for
the Apple IIe also used a DA15F. And the Apple IIc used a DA15F for an auxiliary video port
which was not RGB, but provided the necessary signals to derive RGB.

[edit] Game controller ports

Starting in the late 1970s the Atari 2600 game console used DE9 connectors without the pair of
fastening screws (male on the system, female on the controller) for its game controller
connectors. In the years following, various video game consoles and home computers adopted
the connector for their own game ports, though they were not all interoperable. The common
wirings supported digital connections for up, down, left, and right buttons along with one or two
others. Some systems supported connecting a pair of analog potentiometers, or paddles, and on
some computers a computer mouse or a light pen was also supported via the game port. Like
joysticks, these devices were not typically interchangeable between different systems.

Systems utilizing the DE9 connector for their game port included the Atari 8-bit and ST lines;
the Commodore VIC-20, 64, 128, and Amiga; the Amstrad CPC (which employed daisy-
chaining when connecting two Amstrad-specific joysticks); the MSX, Sharp X68000, and FM-
Towns, predominantly used in Japan; the Sega Master System and Sega Genesis; and the
Panasonic 3DO. The Sinclair ZX Spectrum lacked a built-in joystick connector of any kind but
aftermarket interfaces provided the ability to connect DE9 joysticks.

Many Apple II computers also used DE9 connectors for joysticks, but they had a female port on
the computer and a male on the controller, used analog rather than digital sticks, and the pin-out
was completely unlike that used on the aforementioned systems. DE9 connectors were not used
for game ports on the Apple Macintosh, Apple III, IBM PC systems, or most newer game
consoles.

DA15S connectors are used for PC joystick connectors, where each DA15 connector supports
two joysticks each with two analog axes and two buttons. In other words, one DA15S "game
adapter" connector has 4 analog potentiometer inputs and 4 digital switch inputs. This interface
is strictly input-only, though it does provide +5V DC power. Some joysticks with more than two
axes and/or more than two buttons use the signals designated for both joysticks. Conversely, Y-
adapter cables are available that allow two separate joysticks to be connected to a single DA15
game adapter port; if a joystick connected to one of these Y-adapters has more than two axes or
buttons, only the first two of each will work.
The IBM DA15 PC game connector has been modified to add a (usually MPU-401 compatible)
MIDI interface, and this is often implemented in the game connectors on third-party sound cards,
for example the Sound Blaster line from Creative Labs. The "standard" straight game adapter
connector (introduced by IBM) has three ground pins and four +5V power pins, and the MIDI
adaptation replaces one of the grounds and one of the +5V pins, both on the bottom row of pins,
with MIDI In and MIDI Out signal pins. (There is no MIDI Thru provided.) Creative Labs
introduced this adaptation.[citation needed]

[edit] Other

25-pin sockets on Macintosh computers are typically SCSI connectors (again in contrast to the
Centronics C50 connector typically found on the peripheral), while older Sun hardware uses
DD50 connectors for FastSCSI equipment.

The complete range of D-sub connectors also includes DA15s (one row of 7 and one of 8),
DC37s (one row of 18 and one of 19), and DD50s (two rows of 17 and one of 16); these are
often used in industrial products, the 15-way version being commonly used on rotary and linear
encoders.

The early Macintosh and late Apple II computers used an obscure 19-pin D-sub for connecting to
external floppy disk drives. The Commodore Amiga used an equally unusual 23-pin version for
both its video output and connection to an external floppy disk drive.

TASCAM used DB25 connectors for their multi-track recording audio equipment (TDIF), and
Logitek Audio later did the same for its broadcast consoles, though with different pinouts.[4]
Roland used DB25 connectors for their multi-track recording audio equipment (R-BUS). A few
patch panels have been made which have the DB25 connectors on the back with phone jacks (or
even TRS jacks) on the front, however these are normally wired for TASCAM, which is more
common outside of broadcasting.

In broadcast and professional video, "parallel digital" is a digital video interface that uses DB25
connectors, per the SMPTE 274M specification adopted in the late 1990s. The more common
SMPTE 259M "serial digital interface" (SDI) uses BNC connectors for digital video signal
transfer.

[edit] Wire-contact attachment types
A male PCB-mounting DD50 connector

There are at least five different methods used to attach wires to the contacts in D-sub connectors.

       Solder-bucket (or solder-cup) contacts have a cavity into which the stripped wire is inserted and
    hand-soldered.
       Insulation displacement contacts (IDCs) allow a ribbon cable to be forced onto sharp tines on the
    back of the contacts; this action pierces the insulation of all the wires simultaneously. This is a very
    quick means of assembly whether done by hand or automatically.
       Crimp contacts are assembled by inserting a stripped wire end into a cavity in the rear of the
    contact, then crushing the cavity using a crimp tool, causing the cavity to grip the wire tightly at
    many points. The crimped contact is then inserted into the connector where it locks into place.
    Individual crimped pins can be removed later by inserting a special tool into the rear of the
    connector.
       PCB pins are soldered directly to a printed circuit board and not to a wire. These connectors are
    frequently mounted at a right angle to the PCB, allowing a cable to be plugged into the edge of the
    PCB assembly.
       Wire wrap connections are made by wrapping solid wire around a square post with a wire wrap
    tool. This type of connection is usually used in prototyping.


[edit] Usage
The 25-pin D-sub connector is occasionally used in recording studios for multi-channel analog
audio and AES digital audio.

The D-sub connector family is now in decline for general usage in the computer industry, due to
size and cost. For portable devices such as PDAs, MP3 players or mobile phones, the D-sub
connector is usually too large to fit. In the laptop computer sector, where weight and size are
crucial, many models no longer include D-subs. Even small form factor desktop PCs may find
D-sub connectors too large for their value.

Because of its relative complexity (the D-shaped metal shield, the screws and nuts), D-sub
connectors are now quite expensive compared to other, mostly simpler, common connectors. In
the retail PC world where margins are very thin, these connectors are a natural target for
removal.

The physical design of D-sub connectors is ill-suited for consumer plug-and-play applications.
Thin metal pins, especially in higher-density connectors, are easily bent or broken, particularly if
frequently plugged in by touch behind equipment. The need to tighten screws for a secure
connection is cumbersome. Although ESD- and EMI-resistant D-sub connectors exist, the
fundamental design was never intended to protect from electrostatic discharge or electromagnetic
interference or facilitate very high frequency interconnections.[citation needed]
For video purposes, the DE15HD connector is in the process of being replaced by DVI and
HDMI connectors. A notable exception to this replacement is on the many analog CRT monitors
still in use: the analog version of the DVI connector is similar in price and more complex than
the D-sub, so the shift away from D-subs is slow in this case. For the majority of other consumer
applications, D-sub serial and parallel connectors have been replaced by the physically much
simpler and cheaper IEEE 1394 (FireWire), SATA, USB, or modular connectors.

D-sub 9 Connector Pinout
Pinout and diagram of DE9 connector (DB9 connector), commonly used for serial ports (RS-
232).

  Pin        SIG.                        Signal Name                             DTE (PC)

   1         DCD                      Data Carrier Detect                            in

   2         RXD                         Receive Data                                in

   3         TXD                         Transmit Data                              out

   4         DTR                     Data Terminal Ready                            out

   5         GND                        Signal Ground                                -

   6         DSR                        Data Set Ready                               in

   7         RTS                       Request to Send                              out

   8         CTS                         Clear to Send                               in

   9          RI                         Ring Indicator                              in


The DTE (PC) has the male connector (shown below), and the DCE (peripheral) has the female.
Related:

Cmd-line tool to transport files over an unreliable serial link
AVR microcontroller C library with UART module for serial comms


Modified Modular Jack (MMJ)
From Wikipedia, the free encyclopedia

Jump to: navigation, search


                 Modified Modular Jack
              MMJ socket and plug


 Type      RS-423 serial


               Production history


Designer   Digital Equipment Corporation


                     Pin out


 Pin 1     Data terminal ready             DTR


 Pin 2     Transmit data                   Tx+


 Pin 3     Transmit data ground            Tx-


 Pin 4     Receive data ground             Rx-


 Pin 5     Receive data                    Rx+


 Pin 6     Data set ready                  DSR
The DECconnect Modified Modular Jack (MMJ) is a variation of the 6P6C modular connector
and was developed by Digital Equipment Corporation. The main difference from the
conventional modular connector is that the hook is toward the side instead of the center of the
plug, making it impossible to insert a standard modular cable plug such as those used telephone
or Ethernet applications. MMJ connectors are used on Digital minicomputers, such as the PDP-
11, VAX and Alpha based machines and to connect terminals, printers or serial console servers.

The six conductors of the DECconnect MMJ connector are used for the main signals in RS-423
serial communication: Tx and Rx for the data transmission and DSR and DTR for handshaking.
The transmit and receive signals are differential, i.e. each signal is the voltage difference
between two conductors, as opposed to a voltage on a single connector relative to a common
reference. But one can in practice wire these signals to an RS-232 device, which uses the
common reference method, by combining the lower voltage sides of each signal to the RS-232
signal ground line. For this type of connection there are a number of models of conversion
adapter.

When connecting two DTE devices such as a computer and a printer, the Digital BC16E
crossover cable is used.

System console
From Wikipedia, the free encyclopedia

 (Redirected from Serial console)

Jump to: navigation, search




Knoppix system console showing the boot process

The system console, root console or simply console is the text entry and display device for
system administration messages, particularly those from the BIOS or boot loader, the kernel,
from the init system and from the system logger. It is a physical device consisting of a keyboard
and a screen.
On traditional minicomputers, the console was a serial console, an RS-232 serial link to a
terminal such as a DEC VT100. This terminal was usually kept in a secured room since it could
be used for certain privileged functions such as halting the system or selecting which media to
boot from. Large midrange systems, e.g. those from Sun Microsystems, Hewlett-Packard and
IBM, still use serial consoles. In larger installations, the console ports are attached to
multiplexers or network-connected multiport serial servers that let an operator connect a terminal
to any of the attached servers. Today, serial consoles are often used for accessing headless
systems, usually with a terminal emulator running on a laptop. Also, routers, enterprise network
switches and other telecommunication equipment have RS-232 serial console ports.

On PCs and workstations, the computer's attached keyboard and monitor have the equivalent
function. Since the monitor cable carries video signals, it cannot be extended very far. Often,
installations with many servers therefore use keyboard/video multiplexers (KVM switches) and
possibly video amplifiers to centralize console access. In recent years, KVM/IP devices have
become available that allow a remote computer to view the video output and send keyboard input
via any TCP/IP network and therefore the Internet.

Some PC BIOSes, especially in servers, also support serial consoles, giving access to the BIOS
through a serial port so that the simpler and cheaper serial console infrastructure can be used.
Even where BIOS support is lacking, some operating systems, e.g. FreeBSD and Linux, can be
configured for serial console operation either during bootup, or after startup.

It is usually possible to log in from the console. Depending on configuration, the operating
system may treat a login session from the console as being more trustworthy than a login session
from other sources.

RS-232
From Wikipedia, the free encyclopedia

Jump to: navigation, search

This article is about the RS-232 standard. For RS-232 variants, see serial port.




A 25 pin connector as described in the RS-232 standard

In telecommunications, RS-232 (Recommended Standard 232) is the traditional name for a
series of standards for serial binary single-ended data and control signals connecting between a
DTE (Data Terminal Equipment) and a DCE (Data Circuit-terminating Equipment). It is
commonly used in computer serial ports. The standard defines the electrical characteristics and
timing of signals, the meaning of signals, and the physical size and pin out of connectors. The
current version of the standard is TIA-232-F Interface Between Data Terminal Equipment and
Data Circuit-Terminating Equipment Employing Serial Binary Data Interchange, issued in 1997.

An RS-232 port was once a standard feature of a personal computer for connections to modems,
printers, mice, data storage, un-interruptible power supplies, and other peripheral devices.
However, the limited transmission speed, relatively large voltage swing, and large standard
connectors motivated development of the universal serial bus which has displaced RS-232 from
most of its peripheral interface roles. Many modern personal computers have no RS-232 ports
and must use an external converter to connect to older peripherals. Some RS-232 devices are still
found especially in industrial machines or scientific instruments.

Contents
       1 Scope of the standard
       2 History
       3 Limitations of the standard
       4 Role in modern personal computers
       5 Standard details
    o            5.1 Voltage levels
    o            5.2 Connectors
    o            5.3 Pinouts
    o            5.4 Cables
       6 Conventions
    o            6.1 RTS/CTS handshaking
    o            6.2 3-wire and 5-wire RS-232
       7 Seldom used features
    o            7.1 Signal rate selection
    o            7.2 Loopback testing
    o            7.3 Timing signals
    o            7.4 Secondary channel
       8 Related standards
       9 Development tools
       10 References



[edit] Scope of the standard
The Electronic Industries Association (EIA) standard RS-232-C[1] as of 1969 defines:

       Electrical signal characteristics such as voltage levels, signaling rate, timing and slew-rate of
    signals, voltage withstand level, short-circuit behavior, and maximum load capacitance.
       Interface mechanical characteristics, pluggable connectors and pin identification.
       Functions of each circuit in the interface connector.
       Standard subsets of interface circuits for selected telecom applications.

The standard does not define such elements as
       character encoding (for example, ASCII, Baudot code or EBCDIC)
       the framing of characters in the data stream (bits per character, start/stop bits, parity)
       protocols for error detection or algorithms for data compression
       bit rates for transmission, although the standard says it is intended for bit rates lower than
    20,000 bits per second. Many modern devices support speeds of 115,200 bit/s and above
       power supply to external devices.

Details of character format and transmission bit rate are controlled by the serial port hardware,
often a single integrated circuit called a UART that converts data from parallel to asynchronous
start-stop serial form. Details of voltage levels, slew rate, and short-circuit behavior are typically
controlled by a line driver that converts from the UART's logic levels to RS-232 compatible
signal levels, and a receiver that converts from RS-232 compatible signal levels to the UART's
logic levels.

[edit] History
RS-232 was first introduced in 1962.[2] The original DTEs were electromechanical
teletypewriters, and the original DCEs were (usually) modems. When electronic terminals (smart
and dumb) began to be used, they were often designed to be interchangeable with teletypes, and
so supported RS-232. The C revision of the standard was issued in 1969 in part to accommodate
the electrical characteristics of these devices.[citation needed]

Since application to devices such as computers, printers, test instruments, and so on was not
considered by the standard, designers implementing an RS-232 compatible interface on their
equipment often interpreted the requirements idiosyncratically. Common problems were non-
standard pin assignment of circuits on connectors, and incorrect or missing control signals. The
lack of adherence to the standards produced a thriving industry of breakout boxes, patch boxes,
test equipment, books, and other aids for the connection of disparate equipment. A common
deviation from the standard was to drive the signals at a reduced voltage. Some manufacturers
therefore built transmitters that supplied +5 V and -5 V and labeled them as "RS-232
compatible".[citation needed]

Later personal computers (and other devices) started to make use of the standard so that they
could connect to existing equipment. For many years, an RS-232-compatible port was a standard
feature for serial communications, such as modem connections, on many computers. It remained
in widespread use into the late 1990s. In personal computer peripherals, it has largely been
supplanted by other interface standards, such as USB. RS-232 is still used to connect older
designs of peripherals, industrial equipment (such as PLCs), console ports, and special purpose
equipment, such as a cash drawer for a cash register.[citation needed]

The standard has been renamed several times during its history as the sponsoring organization
changed its name, and has been variously known as EIA RS-232, EIA 232, and most recently as
TIA 232. The standard continued to be revised and updated by the Electronic Industries Alliance
and since 1988 by the Telecommunications Industry Association (TIA).[3] Revision C was issued
in a document dated August 1969. Revision D was issued in 1986. The current revision is TIA-
232-F Interface Between Data Terminal Equipment and Data Circuit-Terminating Equipment
Employing Serial Binary Data Interchange, issued in 1997. Changes since Revision C have been
in timing and details intended to improve harmonization with the CCITT standard V.24, but
equipment built to the current standard will interoperate with older versions.[citation needed]

Related ITU-T standards include V.24 (circuit identification) and V.28 (signal voltage and
timing characteristics).[citation needed]

[edit] Limitations of the standard
Because the application of RS-232 has extended far beyond the original purpose of
interconnecting a terminal with a modem, successor standards have been developed to address
the limitations. Issues with the RS-232 standard include:[4]

       The large voltage swings and requirement for positive and negative supplies increases power
    consumption of the interface and complicates power supply design. The voltage swing requirement
    also limits the upper speed of a compatible interface.
       Single-ended signaling referred to a common signal ground limits the noise immunity and
    transmission distance.
       Multi-drop connection among more than two devices is not defined. While multi-drop "work-
    arounds" have been devised, they have limitations in speed and compatibility.
       Asymmetrical definitions of the two ends of the link make the assignment of the role of a newly
    developed device problematic; the designer must decide on either a DTE-like or DCE-like interface
    and which connector pin assignments to use.
       The handshaking and control lines of the interface are intended for the setup and takedown of a
    dial-up communication circuit; in particular, the use of handshake lines for flow control is not
    reliably implemented in many devices.
       No method is specified for sending power to a device. While a small amount of current can be
    extracted from the DTR and RTS lines, this is only suitable for low power devices such as mice.
       The 25-way connector recommended in the standard is large compared to current practice.


[edit] Role in modern personal computers




PCI Express x1 card with one RS-232 port

Main article: Serial port
In the book, PC 97 Hardware Design Guide,[5] Microsoft deprecated support for the RS-232
compatible serial port of the original IBM PC design. Today, RS-232 has mostly been replaced
in personal computers by USB for local communications. Compared with RS-232, USB is faster,
uses lower voltages, and has connectors that are simpler to connect and use. However, USB is
limited by standard to no more than 5 meters of cable, thus favoring RS-232 when longer
distances are needed. Both standards have software support in popular operating systems. USB is
designed to make it easy for device drivers to communicate with hardware. However, there is no
direct analog to the terminal programs used to let users communicate directly with serial ports.
USB is more complex than the RS-232 standard because it includes a protocol for transferring
data to devices. This requires more software to support the protocol used. RS-232 only
standardizes the voltage of signals and the functions of the physical interface pins. Serial ports of
personal computers are also sometimes used to directly control various hardware devices, such as
relays or lamps, since the control lines of the interface can be easily manipulated by software.
This isn't feasible with USB, which requires some form of receiver to decode the serial data.

As an alternative, USB docking ports are available which can provide connectors for a keyboard,
mouse, one or more serial ports, and one or more parallel ports. Corresponding device drivers are
required for each USB-connected device to allow programs to access these USB-connected
devices as if they were the original directly connected peripherals. Devices that convert USB to
RS-232 may not work with all software on all personal computers and may cause a reduction in
bandwidth along with higher latency.

Personal computers may use a serial port to interface to devices such as uninterruptible power
supplies. In some cases, serial data is not exchanged, but the control lines are used to signal
conditions such as loss of power or low battery alarms.

Many fields (for example, laboratory automation, surveying) provide a continued demand for
RS-232 I/O due to sustained use of very expensive but aging equipment. It is often far cheaper to
continue to use RS-232 than it is to replace the equipment. Additionally, modern industrial
automation equipment, such as PLCs, VFDs, servo drives, and CNC equipment are
programmable via RS-232. Some manufacturers have responded to this demand: Toshiba re-
introduced the DE-9M connector on the Tecra laptop.

Serial ports with RS-232 are also commonly used to communicate to headless systems such as
servers, where no monitor or keyboard is installed, during boot when operating system isn't
running yet and therefore no network connection is possible. An RS-232 serial port can
communicate to some embedded systems such as routers as an alternative to network mode of
monitoring.

[edit] Standard details
In RS-232, user data is sent as a time-series of bits. Both synchronous and asynchronous
transmissions are supported by the standard. In addition to the data circuits, the standard defines
a number of control circuits used to manage the connection between the DTE and DCE. Each
data or control circuit only operates in one direction, that is, signaling from a DTE to the
attached DCE or the reverse. Since transmit data and receive data are separate circuits, the
interface can operate in a full duplex manner, supporting concurrent data flow in both directions.
The standard does not define character framing within the data stream, or character encoding.

[edit] Voltage levels




Diagrammatic oscilloscope trace of voltage levels for an uppercase ASCII "K" character (0x4b) with 1
start bit, 8 data bits, 1 stop bit

.

The RS-232 standard defines the voltage levels that correspond to logical one and logical zero
levels for the data transmission and the control signal lines. Valid signals are plus or minus 3 to
15 volts; the ±3 V range near zero volts is not a valid RS-232 level. The standard specifies a
maximum open-circuit voltage of 25 volts: signal levels of ±5 V, ±10 V, ±12 V, and ±15 V are
all commonly seen depending on the power supplies available within a device. RS-232 drivers
and receivers must be able to withstand indefinite short circuit to ground or to any voltage level
up to ±25 volts. The slew rate, or how fast the signal changes between levels, is also controlled.

For data transmission lines (TxD, RxD and their secondary channel equivalents) logic one is
defined as a negative voltage, the signal condition is called marking, and has the functional
significance. Logic zero is positive and the signal condition is termed spacing. Control signals
are logically inverted with respect to what one sees on the data transmission lines. When one of
these signals is active, the voltage on the line will be between +3 to +15 volts. The inactive state
for these signals is the opposite voltage condition, between −3 and −15 volts. Examples of
control lines include request to send (RTS), clear to send (CTS), data terminal ready (DTR), and
data set ready (DSR).

Because the voltage levels are higher than logic levels typically used by integrated circuits,
special intervening driver circuits are required to translate logic levels. These also protect the
device's internal circuitry from short circuits or transients that may appear on the RS-232
interface, and provide sufficient current to comply with the slew rate requirements for data
transmission.

Because both ends of the RS-232 circuit depend on the ground pin being zero volts, problems
will occur when connecting machinery and computers where the voltage between the ground pin
on one end, and the ground pin on the other is not zero. This may also cause a hazardous ground
loop. Use of a common ground limits RS-232 to applications with relatively short cables. If the
two devices are far enough apart or on separate power systems, the local ground connections at
either end of the cable will have differing voltages; this difference will reduce the noise margin
of the signals. Balanced, differential, serial connections such as USB, RS-422 and RS-485 can
tolerate larger ground voltage differences because of the differential signaling.[6]

Unused interface signals terminated to ground will have an undefined logic state. Where it is
necessary to permanently set a control signal to a defined state, it must be connected to a voltage
source that asserts the logic 1 or logic 0 level. Some devices provide test voltages on their
interface connectors for this purpose.

[edit] Connectors

RS-232 devices may be classified as Data Terminal Equipment (DTE) or Data Communication
Equipment (DCE); this defines at each device which wires will be sending and receiving each
signal. The standard recommended but did not make mandatory the D-subminiature 25 pin
connector. In general and according to the standard, terminals and computers have male
connectors with DTE pin functions, and modems have female connectors with DCE pin
functions. Other devices may have any combination of connector gender and pin definitions.
Many terminals were manufactured with female terminals but were sold with a cable with male
connectors at each end; the terminal with its cable satisfied the recommendations in the standard.

Presence of a 25 pin D-sub connector does not necessarily indicate an RS-232-C compliant
interface. For example, on the original IBM PC, a male D-sub was an RS-232-C DTE port (with
a non-standard current loop interface on reserved pins), but the female D-sub connector was used
for a parallel Centronics printer port. Some personal computers put non-standard voltages or
signals on some pins of their serial ports.

The standard specifies 20 different signal connections. Since most devices use only a few
signals, smaller connectors can often be used.

[edit] Pinouts

The following table lists commonly used RS-232 signals and pin assignments.[7] See serial port
for non-standard variations including the popular DE-9 connector.

                                          Signal                                        Origin DB-
                                                                                               25
   Name                             Typical purpose                       Abbreviation DTE DCE
                                                                                               pin
Data
Terminal    Indicates presence of DTE to DCE.                                 DTR        ●       20
Ready
Data Carrier
             DCE is connected to the telephone line.                          DCD            ●       8
Detect
Data Set    DCE is ready to receive commands or data.                         DSR            ●       6
Ready
Ring
             DCE has detected an incoming ring signal on the telephone line.   RI           ●   22
Indicator
Request To
           DTE requests the DCE prepare to receive data.                       RTS      ●           4
Send
Clear To
             Indicates DCE is ready to accept data.                            CTS          ●       5
Send
Transmitted
            Carries data from DTE to DCE.                                      TxD      ●           2
Data
Received
             Carries data from DCE to DTE.                                     RxD          ●       3
Data
Common
                                                                               GND     common       7
Ground
Protective
                                                                               PG      common       1
Ground

The signals are named from the standpoint of the DTE. The ground signal is a common return for
the other connections. The DB-25 connector includes a second "protective ground" on pin 1.

Data can be sent over a secondary channel (when implemented by the DTE and DCE devices),
which is equivalent to the primary channel. Pin assignments are described in following table:

               Signal                        Pin
Common Ground                      7 (same as primary)
Secondary Transmitted Data (STD) 14
Secondary Received Data (SRD)      16
Secondary Request To Send (SRTS) 19
Secondary Clear To Send (SCTS)     13
Secondary Carrier Detect (SDCD)    12


[edit] Cables

Main article: Serial cable

The standard does not define a maximum cable length but instead defines the maximum
capacitance that a compliant drive circuit must tolerate. A widely used rule of thumb indicates
that cables more than 50 feet (15 metres) long will have too much capacitance, unless special
cables are used. By using low-capacitance cables, full speed communication can be maintained
over larger distances up to about 1,000 feet.[8] For longer distances, other signal standards are
better suited to maintain high speed.
Since the standard definitions are not always correctly applied, it is often necessary to consult
documentation, test connections with a breakout box, or use trial and error to find a cable that
works when interconnecting two devices. Connecting a fully standard-compliant DCE device
and DTE device would use a cable that connects identical pin numbers in each connector (a so-
called "straight cable"). "Gender changers" are available to solve gender mismatches between
cables and connectors. Connecting devices with different types of connectors requires a cable
that connects the corresponding pins according to the table above. Cables with 9 pins on one end
and 25 on the other are common. Manufacturers of equipment with 8P8C connectors usually
provide a cable with either a DB-25 or DE-9 connector (or sometimes interchangeable
connectors so they can work with multiple devices). Poor-quality cables can cause false signals
by crosstalk between data and control lines (such as Ring Indicator). If a given cable will not
allow a data connection, especially if a Gender changer is in use, a Null modem may be
necessary.

[edit] Conventions
For functional communication through a serial port interface, conventions of bit rate, character
framing, communications protocol, character encoding, data compression, and error detection,
not defined in RS 232, must be agreed to by both sending and receiving equipment. For example,
consider the serial ports of the original IBM PC. This implementation used an 8250 UART using
asynchronous start-stop character formatting with 7 or 8 data bits per frame, usually ASCII
character coding, and data rates programmable between 75 bits per second and 115,200 bits per
second. Data rates above 20,000 bits per second are out of the scope of the standard, although
higher data rates are sometimes used by commercially manufactured equipment. Since most RS-
232 devices do not have automatic baud rate detection, users must manually set the baud rate
(and all other parameters) at both ends of the RS-232 connection.

In the particular case of the IBM PC, as with most UART chips including the 8250 UART used
by the IBM PC, baud rates were programmable with arbitrary values. This allowed a PC to be
connected to devices not using the rates typically used with modems. Note that due to the clock
frequency which IBM chose to feed the 8250 UART in the PC, some popular baud rates are
unavailable due to the granularity of the baud rate setting. This includes the baud rate of MIDI,
31,250 bits per second, which is generally not achievable by a standard IBM PC serial port.
MIDI-to-RS-232 interfaces designed for the IBM PC include baud rate translation hardware to
adjust the baud rate of the MIDI data to something that the IBM PC can support, for example
19,200 or 38,400 bits per second.



[edit] RTS/CTS handshaking

Further information: Hardware flow control

In older versions of the specification, RS-232's use of the RTS and CTS lines is asymmetric: The
DTE asserts RTS to indicate a desire to transmit to the DCE, and the DCE asserts CTS in
response to grant permission. This allows for half-duplex modems that disable their transmitters
when not required, and must transmit a synchronization preamble to the receiver when they are
re-enabled. This scheme is also employed on present-day RS-232 to RS-485 converters, where
the RS-232's RTS signal is used to ask the converter to take control of the RS-485 bus - a
concept that doesn't otherwise exist in RS-232. There is no way for the DTE to indicate that it is
unable to accept data from the DCE.

A non-standard symmetric alternative, commonly called "RTS/CTS handshaking," was
developed by various equipment manufacturers. In this scheme, CTS is no longer a response to
RTS; instead, CTS indicates permission from the DCE for the DTE to send data to the DCE, and
RTS indicates permission from the DTE for the DCE to send data to the DTE. RTS and CTS are
controlled by the DTE and DCE respectively, each independent of the other. This was eventually
codified in version RS-232-E (actually TIA-232-E by that time) by defining a new signal, "RTR
(Ready to Receive)," which is CCITT V.24 circuit 133. TIA-232-E and the corresponding
international standards were updated to show that circuit 133, when implemented, shares the
same pin as RTS (Request to Send), and that when 133 is in use, RTS is assumed by the DCE to
be ON at all times.[9]

Thus, with this alternative usage, one can think of RTS asserted (positive voltage, logic 0)
meaning that the DTE is indicating it is "ready to receive" from the DCE, rather than requesting
permission from the DCE to send characters to the DCE.

Note that equipment using this protocol must be prepared to buffer some extra data, since a
transmission may have begun just before the control line state change.

RTS/CTS handshaking is an example of hardware flow control. However, "hardware flow
control" in the description of the options available on an RS-232-equipped device does not
always mean RTS/CTS handshaking.

[edit] 3-wire and 5-wire RS-232

A minimal "3-wire" RS-232 connection consisting only of transmit data, receive data, and
ground, is commonly used when the full facilities of RS-232 are not required. Even a two-wire
connection (data and ground) can be used if the data flow is one way (for example, a digital
postal scale that periodically sends a weight reading, or a GPS receiver that periodically sends
position, if no configuration via RS-232 is necessary). When only hardware flow control is
required in addition to two-way data, the RTS and CTS lines are added in a 5-wire version.

[edit] Seldom used features
The EIA-232 standard specifies connections for several features that are not used in most
implementations. Their use requires the 25-pin connectors and cables, and of course both the
DTE and DCE must support them.

[edit] Signal rate selection
The DTE or DCE can specify use of a "high" or "low" signaling rate. The rates as well as which
device will select the rate must be configured in both the DTE and DCE. The prearranged device
selects the high rate by setting pin 23 to ON.

[edit] Loopback testing

Many DCE devices have a loopback capability used for testing. When enabled, signals are
echoed back to the sender rather than being sent on to the receiver. If supported, the DTE can
signal the local DCE (the one it is connected to) to enter loopback mode by setting pin 18 to ON,
or the remote DCE (the one the local DCE is connected to) to enter loopback mode by setting pin
21 to ON. The latter tests the communications link as well as both DCE's. When the DCE is in
test mode it signals the DTE by setting pin 25 to ON.

A commonly used version of loopback testing doesn't involve any special capability of either
end. A hardware loopback is simply a wire connecting complementary pins together in the same
connector (see loopback).

Loopback testing is often performed with a specialized DTE called a bit error rate tester (or
BERT).

[edit] Timing signals

Some synchronous devices provide a clock signal to synchronize data transmission, especially at
higher data rates. Two timing signals are provided by the DCE on pins 15 and 17. Pin 15 is the
transmitter clock, or send timing (ST); the DTE puts the next bit on the data line (pin 2) when
this clock transitions from OFF to ON (so it is stable during the ON to OFF transition when the
DCE registers the bit). Pin 17 is the receiver clock, or receive timing (RT); the DTE reads the
next bit from the data line (pin 3) when this clock transitions from ON to OFF.

Alternatively, the DTE can provide a clock signal, called transmitter timing (TT), on pin 24 for
transmitted data. Data is changed when the clock transitions from OFF to ON and read during
the ON to OFF transition. TT can be used to overcome the issue where ST must traverse a cable
of unknown length and delay, clock a bit out of the DTE after another unknown delay, and return
it to the DCE over the same unknown cable delay. Since the relation between the transmitted bit
and TT can be fixed in the DTE design, and since both signals traverse the same cable length,
using TT eliminates the issue. TT may be generated by looping ST back with an appropriate
phase change to align it with the transmitted data. ST loop back to TT lets the DTE use the DCE
as the frequency reference, and correct the clock to data timing.

Synchronous clocking is required for such protocols as SDLC, HDLC, and X.25.

[edit] Secondary channel

There is a secondary data channel, identical in capability to the first. Five signals (plus the
common ground of the primary channel) comprise the secondary channel: Secondary
Transmitted Data (STD), Secondary Received Data (SRD), Secondary Request To Send (SRTS),
Secondary Clear To Send (SCTS), and Secondary Carrier Detect (SDCD).

[edit] Related standards
Other serial signaling standards may not interoperate with standard-compliant RS-232 ports. For
example, using the TTL levels of near +5 and 0 V puts the mark level in the undefined area of
the standard. Such levels are sometimes used with NMEA 0183-compliant GPS receivers and
depth finders.

A 20 mA current loop uses the absence of 20 mA current for high, and the presence of current in
the loop for low; this signaling method is often used for long-distance and optically isolated
links. Connection of a current-loop device to a compliant RS-232 port requires a level translator.
Current-loop devices can supply voltages in excess of the withstand voltage limits of a compliant
device. The original IBM PC serial port card implemented a 20 mA current-loop interface, which
was never emulated by other suppliers of plug-compatible equipment.

Other serial interfaces similar to RS-232:

       RS-422 (a high-speed system similar to RS-232 but with differential signaling)
       RS-423 (a high-speed system similar to RS-422 but with unbalanced signaling)
       RS-449 (a functional and mechanical interface that used RS-422 and RS-423 signals - it never
    caught on like RS-232 and was withdrawn by the EIA)
       RS-485 (a descendant of RS-422 that can be used as a bus in multidrop configurations)
       MIL-STD-188 (a system like RS-232 but with better impedance and rise time control)
       EIA-530 (a high-speed system using RS-422 or RS-423 electrical properties in an EIA-232 pinout
    configuration, thus combining the best of both; supersedes RS-449)
       EIA/TIA-561 8 Position Non-Synchronous Interface Between Data Terminal Equipment and Data
    Circuit Terminating Equipment Employing Serial Binary Data Interchange
       EIA/TIA-562 Electrical Characteristics for an Unbalanced Digital Interface (low-voltage version of
    EIA/TIA-232)
       TIA-574 (standardizes the 9-pin D-subminiature connector pinout for use with EIA-232 electrical
    signalling, as originated on the IBM PC/AT)
       SpaceWire (high-speed serial system designed for use on board spacecraft).


[edit] Development tools
When developing or troubleshooting systems using RS-232, close examination of hardware
signals can be important to find problems. A serial line analyzer is a device similar to a logic
analyzer but specialized for RS-232's voltage levels, connectors, and, where used, clock signals.
The serial line analyzer can collect, store, and display the data and control signals, allowing
developers to view them in detail. Some simply display the signals as waveforms; more elaborate
versions include the ability to decode characters in ASCII or other common codes and to
interpret common protocols used over RS-232 such as SDLC, HDLC, DDCMP, and X.25. Serial
line analyzers are available as standalone units, as software and interface cables for general-
purpose logic analyzers, and as programs that run in common personal computers.
Serial port
From Wikipedia, the free encyclopedia

Jump to: navigation, search




A male DE-9 connector used for a serial port on a IBM PC compatible computer. (Pinout)




A male Mini DIN-8 connector used for a serial port on a Macintosh or SGI style computer.

In computing, a serial port is a serial communication physical interface through which
information transfers in or out one bit at a time (contrast parallel port).[1] Throughout most of the
history of personal computers, data transfer through serial ports connected the computer to
devices such as terminals and various peripherals.

While such interfaces as Ethernet, FireWire, and USB all send data as a serial stream, 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, shop till 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 Connectors
    o           1.2 Pinouts
    o           1.3 Hardware abstraction
       2 Common applications for serial ports
    o           2.1 Historic uses
       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



[edit] Hardware
PCI Express card with one serial port

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 an output pin, using the so-called 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 FireWire to 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.

[edit] 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 neither
necessary nor sufficient to indicate use of a serial port, since this connector was also used for
video, joysticks, and other purposes.

Some miniaturized electronics, particularly graphing calculators and hand-held amateur and two-
way radio equipment, have serial ports using a jack plug 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 some PowerBook 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 Unix computers 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).

[edit] Pinouts

The following table lists commonly-used RS-232 signals and pin assignments.[3]

                                 Signal                                    Origin DB- DE- TIA-
                                                                                               Yost DEC
                                                                                  25 9 561
   Name                    Typical purpose                   Abbreviation DTE DCE              pin MMJ
                                                                                  pin pin pin
Data
             OOB control signal: Tells DCE that DTE is
Terminal                                                         DTR      ●       20 4     3   2    1
             ready to be connected.
Ready
Data Carrier OOB control signal: Tells DTE that DCE is
                                                                 DCD          ●    8   1   2
Detect       connected to telephone line.
                                                                                               7    6
Data Set     OOB control signal: Tells DTE that DCE is
                                                                 DSR          ●    6   6
Ready        ready to receive commands or data.
                                                                                           1
Ring         OOB control signal: Tells DTE that DCE has
                                                                  RI          ●   22 9         —   —
Indicator    detected a ring signal on the telephone line.
Request To OOB control signal: Tells DCE to prepare to
                                                                 RTS      ●        4   7   8   1   —
Send       accept data from DTE.
Clear To     OOB control signal: Acknowledges RTS and
                                                                 CTS          ●    5   8   7   8   —
Send         allows DTE to transmit.
Transmitted
            Data signal: Carries data from DTE to DCE.           TxD      ●        2   3   6   3    2
Data
Received     Data signal: Carries data from DCE to DTE.          RxD          ●    3   2   5   6    5
Data
Common
                                                              GND       common     7   5    4   4, 5 3, 4
Ground
Protective
                                                               PG       common     1   — —      —     —
Ground

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,[4][5] and the Yost standard combines DSR and
DCD.




A converter from USB to an RS-232 compatible serial port; more than a physical transition, it requires a
driver in the host system software and a built-in processor to emulate the functions of the IBM-XT
compatible serial port hardware.

[edit] 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 UART hardware 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 COM ports: COM1,
COM2, etc.

[edit] 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.

      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
      Software debuggers that run on a 2nd computer.
      Industrial field buses

[edit] Historic uses

      Printers
      Computer terminal, teletype
      Dial-up modems
      Older digital cameras
      Networking (Macintosh AppleTalk using RS-422 at 230.4 kbit/s)
      Serial mouse
      Older Joysticks
      Older GSM mobile phones

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. The most important 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.

[edit] Settings
Many settings are required for serial connections used for asynchronous start-stop
communication, to select speed, number of data bits per character, parity, and number of stop
bits per character. In modern serial ports using a UART integrated circuit, all settings are usually
software-controlled; hardware from the 1980s and earlier may require setting switches or
jumpers on a circuit board. One of the simplifications made in such serial bus standards as
Ethernet, FireWire, and USB is that many of those parameters have fixed values so that users can
not and need not change the configuration; the speed is either fixed or automatically negotiated.
Often if the settings are entered incorrectly the connection will not be dropped; however, any
data sent will be received on the other end as nonsense.

[edit] Speed

Serial ports use two-level (binary) signaling, so the data rate in bits per second is equal to the
symbol rate in bauds. A standard series of rates is based on multiples of the rates for
electromechanical teleprinters; some serial ports allow many arbitrary rates to be selected. The
port speed and device speed must match. The capability to set a bit rate does not imply that a
working connection will result. Not all bit rates are possible with all serial ports. Some special-
purpose protocols such as MIDI for musical instrument control, use serial data rates other than
the teleprinter series. Some serial port systems can automatically detect the bit rate.

The speed includes bits for framing (stop bits, parity, etc.) and so the effective data rate is lower
than the bit transmission rate. For example with 8-N-1 character framing only 80% of the bits are
available for data (for every eight bits of data, two more framing bits are sent).

Common bit rates include 1200, 2400, 4800, 9600, 14400, 19200, 38400, 57600 and 115200
bit/s.[6]

[edit] Data bits

The number of data bits in each character can be 5 (for Baudot code), 6 (rarely used), 7 (for true
ASCII), 8 (for any kind of data, as this matches the size of a byte), or 9 (rarely used). 8 data bits
are almost universally used in newer applications. 5 or 7 bits generally only make sense with
older equipment such as teleprinters.

Most serial communications designs send the data bits within each byte LSB (Least Significant
Bit) first. This standard is also referred to as "little endian". Also possible, but rarely used, is "big
endian" or MSB (Most Significant Bit) first serial communications. (See Endianness for more
about bit ordering.) The order of bits is not usually configurable, but data can be byte-swapped
only before sending.

[edit] Parity

Main article: Parity bit

Parity is a method of detecting errors in transmission. When parity is used with a serial port, an
extra data bit is sent with each data character, arranged so that the number of 1 bits in each
character, including the parity bit, is always odd or always even. If a byte is received with the
wrong number of 1s, then it must have been corrupted. However, an even number of errors can
pass the parity check.

Electromechanical teleprinters were arranged to print a special character when received data
contained a parity error, to allow detection of messages damaged by line noise. A single parity
bit does not allow implementation of error correction on each character, and communication
protocols working over serial data links will have higher-level mechanisms to ensure data
validity and request retransmission of data that has been incorrectly received.

The parity bit in each character can be set to none (N), odd (O), even (E), mark (M), or space (S).
None means that no parity bit is sent at all. Mark parity means that the parity bit is always set to
the mark signal condition (logical 1) and likewise space parity always sends the parity bit in the
space signal condition. Aside from uncommon applications that use the 9th (parity) bit for some
form of addressing or special signalling, mark or space parity is uncommon, as it adds no error
detection information. Odd parity is more common than even, since it ensures that at least one
state transition occurs in each character, which makes it more reliable. The most common parity
setting, however, is "none", with error detection handled by a communication protocol.

[edit] Stop bits

Stop bits sent at the end of every character allow the receiving signal hardware to detect the end
of a character and to resynchronise with the character stream. Electronic devices usually use one
stop bit. If slow electromechanical teleprinters are used, one-and-one half or two stop bits are
required.

[edit] Conventional notation

The D/P/S (Data/Parity/Stop) conventional notation specifies the framing of a serial connection.
The most common usage on microcomputers is 8/N/1 (8N1). This specifies 8 data bits, no parity,
1 stop bit. In this notation, the parity bit is not included in the data bits. 7/E/1 (7E1) means that
an even parity bit is added to the seven data bits for a total of eight bits between the start and stop
bits. If a receiver of a 7/E/1 stream is expecting an 8/N/1 stream, half the possible bytes will be
interpreted as having the high bit set.

[edit] Flow control

Main article: Flow control

A serial port may use signals in the interface to pause and resume the transmission of data. For
example, a slow printer might need to handshake with the serial port to indicate that data should
be paused while the mechanism advances a line.

Common hardware handshake signals (hardware flow control) use the RS-232 RTS/CTS or
DTR/DSR signal circuits. Generally, the RTS and CTS are turned off and on from alternate ends
to control data flow, for instance when a buffer is almost full. DTR and DSR are usually on all
the time and, per the RS-232 standard and its successors, are used to signal from each end that
the other equipment is actually present and powered-up. However, manufacturers have over the
years built many devices that implemented non-standard variations on the standard, for example,
printers that use DTR as flow control.

Another method of flow control (software flow control) uses special characters such as
XON/XOFF to control the flow of data. The XON/XOFF characters are sent by the receiver to
the sender to control when the sender will send data, that is, these characters go in the opposite
direction to the data being sent. The circuit starts in the "sending allowed" state. When the
receiver's buffers approach capacity, the receiver sends the XOFF character to tell the sender to
stop sending data. Later, after the receiver has emptied its buffers, it sends an XON character to
tell the sender to resume transmission. These are non-printing characters and are interpreted as
handshake signals by printers, terminals, and computer systems.

XON/XOFF flow control is an example of inband signaling, in which control information is sent
over the same channel used for the data. If the XON and XOFF characters might appear in the
data being sent, XON/XOFF handshaking presents difficulties, as receivers may interpret them
as flow control. Such characters sent as part of the data stream must be encoded in an escape
sequence to prevent this, and the receiving and sending software must generate and interpret
these escape sequences. On the other hand, since no extra signal circuits are required,
XON/XOFF flow control can be done on a 3 wire interface.

[edit] "Virtual" serial ports
Main article: Virtual serial port

A virtual serial port is an emulation of the standard serial port. This port is created by software
which enable extra serial ports in an operating system without additional hardware installation
(such as expansion cards, etc.). Unlike a physical serial port the virtual one can be assigned any
name (COM255, VSP33, etc.). It is possible to create a large number of virtual serial ports in a
PC. The only limitation is the amount of resources, such as operating memory and computing
power, needed to emulate many serial ports at the same time.

Virtual serial ports emulate all hardware serial port functionality, including Baud rate, Data bits,
Parity bits, Stop bits, etc. Additionally they allow controlling the data flow, emulating all signal
lines (DTR/DSR/CTS/RTS/DCD/RI) and customizing pinout. Virtual serial ports are common
with Bluetooth and are the standard way of receiving data from Bluetooth-equipped GPS
modules.

Virtual serial port emulation can be useful in case there is a lack of available physical serial ports
or they do not meet the current requirements. For instance, virtual serial ports can share data
between several applications from one GPS device connected to a serial port. Another option is
to communicate with any other serial devices via internet or LAN as if they are locally connected
to computer (Serial-over-Ethernet technology). Two computers or applications can communicate
through an emulated serial port link. Virtual serial port emulators are available for Microsoft
Windows and some of them run under Windows CE, Windows Mobile and Pocket PC.
Parallel port
From Wikipedia, the free encyclopedia

Jump to: navigation, search

This article is about the Centronics style port. For the concept in general, see Parallel communications.




A DB-25 parallel printer port, as on IBM-PC style, and a few other types of computers.




Micro ribbon 36 pin female, such as on printers and on some computers, particularly industrial
equipment and early (pre-1980s) personal computers.

A parallel port is a type of interface found on computers (personal and otherwise) for
connecting various peripherals. In computing, a parallel port is a parallel communication
physical interface. It is also known as a printer port or Centronics port. The IEEE 1284
standard defines the bi-directional version of the port, which allows the transmission and
reception of data bits at the same time.

Contents
     1 History
     2 Uses
    o         2.1 Current use
     3 Implementation on IBM personal computers
    o         3.1 Port addresses
    o         3.2 Program interface
      4 Pinouts
      5 Unidirectional parallel ports
      6 See also
      7 References
      8 External links



[edit] History
The Centronics Model 101 printer was introduced in 1970 and included the first parallel interface
for printers.[1] The interface was developed by Robert Howard and Prentice Robinson at
Centronics. The Centronics parallel interface quickly became a de facto industry standard;
manufacturers of the time tended to use various connectors on the system side, so a variety of
cables were required. For example, early VAX systems used a DC-37 connector, NCR used the
36-pin micro ribbon connector, Texas Instruments used a 25-pin card edge connector and Data
General used a 50-pin micro ribbon connector.

Dataproducts introduced a very different implementation of the parallel interface for their
printers. It used a DC-37 connector on the host side and a 50 pin connector on the printer side—
either a DD-50 (sometimes incorrectly referred to as a "DB50") or the block shaped M-50
connector; the M-50 was also referred to as Winchester.[2][3] Dataproducts parallel was available
in a short-line for connections up to 50 feet (15 m) and a long-line version for connections from
50 feet (15 m) to 500 feet (150 m). The Dataproducts interface was found on many mainframe
systems up through the 1990s, and many printer manufacturers offered the Dataproducts
interface as an option.

IBM released the IBM Personal Computer in 1981 and included a variant of the Centronics
interface— only IBM logo printers (rebranded from Epson) could be used with the IBM PC.[4]
IBM standardized the parallel cable with a DB25F connector on the PC side and the Centronics
connector on the printer side. Vendors soon released printers compatible with both standard
Centronics and the IBM implementation.

IBM implemented an early form of bidirectional interface in 1987. HP introduced their version
of bidirectional, known as Bitronics, on the LaserJet 4 in 1992. The Bitronics and Centronics
interfaces were superseded by the IEEE 1284 standard in 1994.

[edit] Uses
Before the advent of USB, the parallel interface was adapted to access a number of peripheral
devices other than printers. Probably one of the earliest devices to use parallel were dongles used
as a hardware key form of software copy protection. Zip drives and scanners were early
implementations followed by external modems, sound cards, webcams, gamepads, joysticks,
external hard disk drives and CD-ROM drives. Adapters were available to run SCSI devices via
parallel. Other devices such as EPROM programmers and hardware controllers could be
connected parallel.
[edit] Current use

For consumers, the USB interface—and often Ethernet—has effectively replaced the parallel
printer port. Many manufacturers of personal computers and laptops consider parallel to be a
legacy port and no longer include the parallel interface. The guidelines for Microsoft's Windows
Logo Program "strongly discourages" systems builders from including parallel ports.[5] USB-to-
parallel adapters are available that can make parallel-only printers work with USB-only systems.

[edit] Implementation on IBM personal computers
[edit] Port addresses

Traditionally IBM PC systems have allocated their first three parallel ports according to the
configuration in the table below.

PORT NAME Interrupt # Starting I/O Ending I/O

LPT1        IRQ 2      0x3bc      0x3bf

LPT2        IRQ 7      0x378      0x37f

LPT3        IRQ 5      0x278      0x27f



If there is an unused LPTx slot, the port addresses of the others are moved up. (For example, if a
port at 0x3bc does not exist, the port at 0x378 will then become LPT1.)[6] The IRQ lines,
however, remain fixed (therefore, 0x378 at LPT1 would use IRQ 7)[citation needed]. . The port
addresses assigned to each LPTx slot can be determined by reading the BIOS Data Area (BDA)
at 0000:0408.

Bit to Pin Mapping for the Standard Parallel Port (SPP):

          Address                MSB                      LSB

                             Bit: 7    6 5 4 3     2 1    0

Base (Data port)             Pin: 9    8 7 6 5     4 3    2

Base+1 (Status port) Pin: ~11 10 12 13 15

Base+2 (Control port) Pin:                      ~17 16 ~14 ~1


~ indicates a hardware inversion of the bit.
[edit] Program interface

In versions of Windows that did not use the Windows NT kernel (as well as DOS and some other
operating systems), programs could access the parallel port with simple outportb() and inportb()
subroutine commands. In operating systems such as Windows NT and Unix (NetBSD, FreeBSD,
Solaris, 386BSD, etc.), the microprocessor is operated in a different security ring, and access to
the parallel port is inhibited, unless using the required driver. This improves security and
arbitration of device contention. On Linux, inb() and outb() can be used when a process is run as
root and an ioperm() command is used to allow access to its base address; alternatively, ppdev
allows shared access and can be used from userspace if the appropriate permissions are set. The
cross-platform library for parallel port access, libieee1284, also is available on many Linux
distributions and provides an abstract interface to the parallel ports of the system. Access is
handled in an open-claim-release-close sequence, which allows for concurrent access in
userspace.

[edit] Pinouts
Pinouts for parallel port connectors are:

Pin No (DB25) Pin No (36 pin) Signal name Direction Register - bit Inverted

1             1              Strobe         In/Out   Control-0    Yes

2             2              Data0          Out      Data-0       No

3             3              Data1          Out      Data-1       No

4             4              Data2          Out      Data-2       No

5             5              Data3          Out      Data-3       No

6             6              Data4          Out      Data-4       No

7             7              Data5          Out      Data-5       No

8             8              Data6          Out      Data-6       No

9             9              Data7          Out      Data-7       No

10            10             Ack            In       Status-6     No

11            11             Busy           In       Status-7     Yes

12            12             Paper-Out      In       Status-5     No
13            13              Select        In        Status-4      No

14            14              Linefeed      In/Out    Control-1     Yes

15            32              Error         In        Status-3      No

16            31              Reset         In/Out    Control-2     No

17            36              Select-Printer In/Out   Control-3     Yes

18-25         19-30,33,17,16 Ground         -         -             -


Inverted lines are true on logic low. If they aren't inverted, then logic high is true.

Pin 25 on the DB25 connector might not be connected to Ground on modern computers.

[edit] Unidirectional parallel ports
In early parallel ports the data lines were unidirectional (data out only) so it was not easily
possible to feed data in to the computer. However, a workaround was possible by using 4 of the 5
status lines. A circuit could be constructed to split each 8-bit byte into two 4-bit nibbles which
were fed in sequentially through the status lines. Each pair of nibbles was then re-combined into
an 8-bit byte. This same method (with the splitting and recombining done in software) was also
used to transfer data between PCs using a laplink cable.

								
To top