Tuesday, May 17, 2011

Parallel ATA

Parallel ATA

From Wikipedia, the free encyclopedia
Parallel ATA
ATA on mainboard.jpgAta 20070127 002.jpg
ATA connector on the right, with two motherboard ATA sockets on the left.
Type Internal storage device connector
Production history
Designer Western Digital, subsequently amended by many others
Designed 1986
Superseded by Serial ATA (2003)
General specifications
Hot pluggable No
External No
Cable 40 or 80 wires ribbon cable
Pins 40
Data
Width 16 bits
Bitrate 16 MB/s originally
later 33, 66, 100 and 133 MB/s
Max. devices 2 (master/slave)
Protocol Parallel
Pin out
ATA Plug.svg
Pin 1
Reset
Pin 2
Ground
Pin 3
Data 7
Pin 4
Data 8
Pin 5
Data 6
Pin 6
Data 9
Pin 7
Data 5
Pin 8
Data 10
Pin 9
Data 4
Pin 10
Data 11
Pin 11
Data 3
Pin 12
Data 12
Pin 13
Data 2
Pin 14
Data 13
Pin 15
Data 1
Pin 16
Data 14
Pin 17
Data 0
Pin 18
Data 15
Pin 19
Ground
Pin 20
Key or VCC_in
Pin 21
DDRQ
Pin 22
Ground
Pin 23
I/O write
Pin 24
Ground
Pin 25
I/O read
Pin 26
Ground
Pin 27
IOCHRDY
Pin 28
Cable select
Pin 29
DDACK
Pin 30
Ground
Pin 31
IRQ
Pin 32
No connect
Pin 33
Addr 1
Pin 34
GPIO_DMA66_Detect
Pin 35
Addr 0
Pin 36
Addr 2
Pin 37
Chip select 1P
Pin 38
Chip select 3P
Pin 39
Activity
Pin 40
Ground
Parallel ATA (PATA), originally ATA, is an interface standard for the connection of storage devices such as hard disks, solid-state drives, floppy drives, and optical disc drives in computers. The standard is maintained by X3/INCITS committee.[1] It uses the underlying AT Attachment (ATA) and AT Attachment Packet Interface (ATAPI) standards.
The Parallel ATA standard is the result of a long history of incremental technical development, which began with the original AT Attachment interface, developed for use in early PC AT equipment. The ATA interface itself evolved in several stages from Western Digital's original Integrated Drive Electronics (IDE) interface. As a result, many near-synonyms for ATA/ATAPI and its previous incarnations are still in common informal use. After the introduction of Serial ATA in 2003, the original ATA was retroactively renamed Parallel ATA.
Parallel ATA cables have a maximum allowable length of only 18 in (457 mm). Because of this limit, the technology normally appears as an internal computer storage interface. For many years ATA provided the most common and the least expensive interface for this application. It has largely been replaced by Serial ATA (SATA) in newer systems.

Contents

History and terminology

The standard was originally conceived as "PC/AT Attachment" as its primary feature was a direct connection to the 16-bit ISA bus introduced with the IBM PC/AT. The "AT" in "IBM PC/AT" is an initialism for "Advanced Technology," but that term does not appear in current or recent versions of the ATA specification; it is simply "AT Attachment". This name was chosen to avoid possible trademark issues.

IDE and ATA-1

The first version of what is now called the ATA/ATAPI interface was developed by Western Digital under the name Integrated Drive Electronics (IDE). Together with Control Data Corporation (who manufactured the hard drive part) and Compaq Computer (into whose systems these drives would initially go), they developed the connector, the signaling protocols, and so on with the goal of remaining software compatible with the existing ST-506 hard drive interface.[2] The first such drives appeared in Compaq PCs in 1986.[3][4]
The term Integrated Drive Electronics refers not just to the connector and interface definition, but also to the fact that the drive controller is integrated into the drive, as opposed to a separate controller on or connected to the motherboard. The interface cards used to connect a parallel ATA drive to, for example, a PCI slot are not drive controllers, they are merely bridges between the host bus and the ATA interface. Since the original ATA interface is essentially just a 16-bit ISA slot in disguise, the bridge was especially simple in case of an ATA connector being located on an ISA interface card. The integrated controller presented the drive to the host computer as an array of 512-byte blocks with a relatively simple command interface. This relieved the mainboard and interface cards in the host computer of the chores of stepping the disk head arm, moving the head arm in and out, and so on, as had to be done with earlier ST-506 and ESDI hard drives. All of these low-level details of the mechanical operation of the drive were now handled by the controller on the drive itself. This also eliminated the need to design a single controller that could handle many different types of drives, since the controller could be unique for the drive. The host need only ask for a particular sector, or block, to be read or written, and either accept the data from the drive or send the data to it.
The interface used by these drives was standardized in 1994 as ANSI standard X3.221-1994, AT Attachment Interface for Disk Drives. After later versions of the standard were developed, this became known as "ATA-1".[5][6]
A short-lived, seldom-used implementation of ATA was created for the IBM XT and similar machines that used the 8-bit version of the ISA bus. It has been referred to as "XTA" or "XT Attachment."[7]

Second ATA interface

When PC motherboard makers started to include onboard ATA interfaces in place of the earlier ISA plug-in cards, there was usually only one ATA connector on the board, which could support up to two hard drives. At the time in combination with the floppy drive, this was sufficient for most people, and eventually it became common to have two hard drives installed. When the CD-ROM was developed, many computers would have been unable to accept these drives if they had been ATA devices, due to already having two hard drives installed. Adding the CD-ROM drive would have required removal of one of the drives.
SCSI was available as a CD-ROM expansion option at the time, but devices with SCSI were more expensive than ATA devices due to the need for a smart interface that is capable of bus arbitration. SCSI typically added US$ 100-300 to the cost of a storage device, in addition to the cost of a SCSI host adapter.
The less-expensive solution was the addition of a dedicated CD-ROM interface, typically included as an expansion option on a sound card. It was included on the sound card because early business PCs did not include support for more than simple beeps from the internal speaker, and tuneful sound playback was considered unnecessary for early business software. When the CD-ROM was introduced, it was logical to also add digital audio to the computer at the same time (for the same reason, sound cards tended to include a gameport interface for joysticks). An older business PC could be upgraded in this manner to meet the Multimedia PC standard for early software packages that used sound (which required the sound card) and colorful video animation (which required the CD-ROM as floppy disks simply did not have the necessary data capacity).
The second drive interface initially was not well-defined. It was first introduced with interfaces specific to certain CD-ROM drives such as Mitsumi, Sony or Panasonic drives,[8] and it was common to find early sound cards with two or three separate connectors each designed to match a certain brand of CD-ROM drive. This evolved into the standard ATA interface for ease of cross-compatibility, though the sound card ATA interface still usually supported only a single CD-ROM and not hard drives.
This second ATA interface on the sound card eventually evolved into the second motherboard ATA interface which was long included as a standard component in all PCs. Called the "primary" and "secondary" ATA interfaces, they were assigned to base addresses 0x1F0 and 0x170 on ISA bus systems.

EIDE and ATA-2

In 1994, about the same time that the ATA-1 standard was adopted, Western Digital introduced drives under a newer name, Enhanced IDE (EIDE). These included most of the features of the forthcoming ATA-2 specification and several additional enhancements. Other manufacturers introduced their own variations of ATA-1 such as "Fast ATA" and "Fast ATA-2".
The new version of the ANSI standard, AT Attachment Interface with Extensions ATA-2 (X3.279-1996), was approved in 1996. It included most of the features of the manufacturer-specific variants.[9][10]
ATA-2 also was the first to note that devices other than hard drives could be attached to the interface:
3.1.7 Device: Device is a storage peripheral. Traditionally, a device on the ATA interface has been a hard disk drive, but any form of storage device may be placed on the ATA interface provided it adheres to this standard.
—from,[10] page 2

ATAPI

As mentioned in the previous sections, ATA was originally designed for, and worked only with hard disks and devices that could emulate them. The introduction of ATAPI (ATA Packet Interface) by a group called the Small Form Factor committee allowed ATA to be used for a variety of other devices that require functions beyond those necessary for hard disks. For example, any removable media device needs a "media eject" command, and a way for the host to determine whether the media is present, and these were not provided in the ATA protocol.
The Small Form Factor committee approached this problem by defining ATAPI, the "ATA Packet Interface". ATAPI is actually a protocol allowing the ATA interface to carry SCSI commands and responses; therefore all ATAPI devices are actually "speaking SCSI" other than at the electrical interface. In fact, some early ATAPI devices were simply SCSI devices with an ATA/ATAPI to SCSI protocol converter added on. The SCSI commands and responses are embedded in "packets" (hence "ATA Packet Interface") for transmission on the ATA cable. This allows any device class for which a SCSI command set has been defined to be interfaced via ATA/ATAPI.
ATAPI devices are also "speaking ATA", as the ATA physical interface and protocol are still being used to send the packets. On the other hand, ATA hard drives and solid state drives do not use ATAPI.
ATAPI devices include CD-ROM and DVD-ROM drives, tape drives, and large-capacity floppy drives such as the Zip drive and SuperDisk drive.
The SCSI commands and responses used by each class of ATAPI device (CD-ROM, tape, etc.) are described in other documents or specifications specific to those device classes and are not within ATA/ATAPI or the T13 committee's purview.
ATAPI was adopted as part of ATA in INCITS 317-1998, AT Attachment with Packet Interface Extension (ATA/ATAPI-4).[11][12][13]

UDMA and ATA-4

The ATA/ATAPI-4 also introduced several "Ultra DMA" transfer modes. These initially supported speeds from 16 MByte/s to 33 MByte/second. In later versions faster Ultra DMA modes were added, requiring a new 80-wire cable to reduce crosstalk. The latest versions of Parallel ATA support up to 133 MByte/s.

Current terminology

The terms "integrated drive electronics" (IDE), "enhanced IDE" and "EIDE" have come to be used interchangeably with ATA (now Parallel ATA, or PATA).
In addition there have been several generations of "EIDE" drives marketed, compliant with various versions of the ATA specification. An early "EIDE" drive might be compatible with ATA-2, while a later one with ATA-6.
Nevertheless a request for an "IDE" or "EIDE" drive from a computer parts vendor will almost always yield a drive that will work with most Parallel ATA interfaces.
Another common usage is to refer to the specification version by the fastest mode supported. For example, ATA-4 supported Ultra DMA modes 0 through 2, the latter providing a maximum transfer rate of 33 megabytes per second. ATA-4 drives are thus sometimes called "UDMA-33" drives, and sometimes "ATA-33" drives. Similarly, ATA-6 introduced a maximum transfer speed of 100 megabytes per second, and some drives complying to this version of the standard are marketed as "PATA/100" drives.

Drive size limitations

The original ATA specification used a 28-bit addressing mode, allowing for the addressing of 228 (268,435,456) sectors (blocks) of 512 bytes each, resulting in a maximum capacity of 128 GiB (137 GB).[14] The BIOS in early PCs imposed smaller limits such as 8.46 GB, with a maximum of 1024 cylinders, 256 heads and 63 sectors, but this was not a limit imposed by the ATA interface.
ATA-6 introduced 48-bit addressing, increasing the limit to 128 PiB (144 PB). As a consequence, any ATA drive of capacity larger than about 137 gigabytes must be an ATA-6 or later drive. Connecting such a drive to a host with an ATA-5 or earlier interface will limit the usable capacity to the maximum of the interface.
Some operating systems, including Windows XP pre-SP 1, and Windows 2000, disable 48-bit LBA by default, requiring the user to take extra steps to use the entire capacity of an ATA drive larger than about 137 gigabytes.[15] Older operating systems, such as Windows 98, do not support 48-bit LBA at all.

Obsolescence

For a long period of time, ATA ruled as the primary storage device interface and in some systems a third and fourth motherboard interface was provided (for example, Promise Ultra-100), for up to eight ATA devices attached to the motherboard.
After the introduction of SATA (Serial ATA), use of Parallel ATA declined, and new motherboards had only a single PATA connector, for up to two PATA optical drives, along with (typically) six or more SATA connectors for hard drives and other devices. In new computers, the parallel ATA interface is rarely used, and several PC chipsets have removed support for PATA, and motherboard vendors still wishing to offer ATA with those chipsets must include an additional interface chip.

Parallel ATA interface

Ribbon cable with two connectors
Parallel ATA cables transfer data 16 bits at a time. The traditional cable uses 40-pin connectors attached to a ribbon cable. Each cable has two or three connectors, one of which plugs into an adapter interfacing with the rest of the computer system. The remaining connector(s) plug into drives.
ATA's cables have had 40 wires for most of its history (44 conductors for the smaller form-factor version used for 2.5" drives — the extra four for power), but an 80-wire version appeared with the introduction of the Ultra DMA/33 (UDMA) mode. All of the additional wires in the new cable are ground wires, interleaved with the previously defined wires to reduce the effects of capacitive coupling between neighboring signal wires, reducing crosstalk. Capacitive coupling is more of a problem at higher transfer rates, and this change was necessary to enable the 66 megabytes per second (MB/s) transfer rate of UDMA4 to work reliably. The faster UDMA5 and UDMA6 modes also require 80-conductor cables.
ATA cables:
40 wire ribbon cable (top)
80 wire ribbon cable (bottom)
Though the number of wires doubled, the number of connector pins and the pinout remain the same as 40-conductor cables, and the external appearance of the connectors is identical. Internally the connectors are different; the connectors for the 80-wire cable connect a larger number of ground wires to a smaller number of ground pins, while the connectors for the 40-wire cable connect ground wires to ground pins one-for-one. 80-wire cables usually come with three differently colored connectors (blue, black, and gray for controller, master drive, and slave drive respectively) as opposed to uniformly colored 40-wire cable's connectors (commonly all gray). The gray connector on 80-conductor cables has pin 28 CSEL not connected, making it the slave position for drives configured cable select.
Round parallel ATA cables (as opposed to ribbon cables) were eventually made available as they were believed to have less effect on computer cooling and were easier to handle; however, only ribbon cables are supported by the ATA specifications.

Pin 20
In the ATA standard pin 20 is defined as (mechanical) key and is not used. This socket on the female connector is often obstructed, requiring pin 20 to be omitted from the male cable or drive connector, making it impossible to plug it in the wrong way round; a male connector with pin 20 present cannot be used. However, some flash memory drives can use pin 20 as VCC_in to power the drive without requiring a special power cable; this feature can only be used if the equipment supports this use of pin 20.[16]

Pin 28
Pin 28 of the gray (slave/middle) connector of an 80 conductor cable is not attached to any conductor of the cable. It is attached normally on the black (master drive end) and blue (motherboard end) connectors.

Pin 34
Pin 34 is connected to ground inside the blue connector of an 80 conductor cable but not attached to any conductor of the cable. It is attached normally on the gray and black connectors. See page 315 of.[17]

Differences between connectors on 80-conductor cables

Differences between connectors
The image shows PATA connectors after removal of strain relief, cover, and cable. Pin one is at bottom left of the connectors, pin 2 is top left, etc., except that the lower image of the blue connector shows the view from the opposite side, and pin one is at top right.
Each contact comprises a pair of points which together pierce the insulation of the ribbon cable with such precision that they make a connection to the desired conductor without harming the insulation on the neighboring wires. The center row of contacts are all connected to the common ground bus and attached to the odd numbered conductors of the cable. The top row of contacts are the even-numbered sockets of the connector (mating with the even-numbered pins of the receptacle) and attach to every other even-numbered conductor of the cable. The bottom row of contacts are the odd-numbered sockets of the connector (mating with the odd-numbered pins of the receptacle) and attach to the remaining even-numbered conductors of the cable.
Note the connections to the common ground bus from sockets 2 (top left), 19 (center bottom row), 22, 24, 26, 30, and 40 on all connectors. Also note (enlarged detail, bottom, looking from the opposite side of the connector) that socket 34 of the blue connector does not contact any conductor but unlike socket 34 of the other two connectors, it does connect to the common ground bus. On the gray connector, note that socket 28 is completely missing, so that pin 28 of the drive attached to the gray connector will be open. On the black connector, sockets 28 and 34 are completely normal, so that pins 28 and 34 of the drive attached to the black connector will be connected to the cable. Pin 28 of the black drive reaches pin 28 of the host receptacle but not pin 28 of the gray drive, while pin 34 of the black drive reaches pin 34 of the gray drive but not pin 34 of the host. Instead, pin 34 of the host is grounded.
The standard dictates color-coded connectors for easy identification by both installer and cable maker. All three connectors are different from one another. The blue (host) connector has the socket for pin 34 connected to ground inside the connector but not attached to any conductor of the cable. Since the old 40 conductor cables do not ground pin 34, the presence of a ground connection indicates that an 80 conductor cable is installed. The wire for pin 34 is attached normally on the other types and is not grounded. Installing the cable backwards (with the black connector on the system board, the blue connector on the remote device and the gray connector on the center device) will ground pin 34 of the remote device and connect host pin 34 through to pin 34 of the center device. The gray center connector omits the connection to pin 28 but connects pin 34 normally, while the black end connector connects both pins 28 and 34 normally.

Multiple devices on a cable

If two devices attach to a single cable, one must be designated as device 0 (commonly referred to as master) and the other as device 1 (slave). This distinction is necessary to allow both drives to share the cable without conflict. The master drive is the drive that usually appears "first" to the computer's BIOS and/or operating system. On old BIOSes (Intel 486 era and older), the drives are often referred to by the BIOS as "C" for the master and "D" for the slave following the way DOS would refer to the active primary partitions on each.
The mode that a drive must use is often set by a jumper setting on the drive itself, which must be manually set to master or slave. If there is a single device on a cable, it should be configured as master. However, some hard drives have a special setting called single for this configuration (Western Digital, in particular). Also, depending on the hardware and software available, a single drive on a cable can work reliably even though configured as the slave drive (this configuration is most often seen when a CD ROM has a channel to itself).

Cable select

A drive mode called cable select was described as optional in ATA-1 and has come into fairly widespread use with ATA-5 and later. A drive set to "cable select" automatically configures itself as master or slave, according to its position on the cable. Cable select is controlled by pin 28. The host adapter grounds this pin; if a device sees that the pin is grounded, it becomes the master device; if it sees that pin 28 is open, the device becomes the slave device.
This setting is usually chosen by a jumper setting on the drive called "cable select", usually marked CS, which is separate from the "master" or "slave" setting.
Note that if two drives are configured as master and slave manually, this configuration does not need to correspond to their position on the cable. Pin 28 is only used to let the drives know their position on the cable; it is not used by the host when communicating with the drives.
With the 40-wire cable it was very common to implement cable select by simply cutting the pin 28 wire between the two device connectors; putting the slave device at the end of the cable, and the master on the middle connector. This arrangement eventually was standardized in later versions. If there is just one device on the cable, this results in an unused stub of cable, which is undesirable for physical convenience and electrical reasons. The stub causes signal reflections, particularly at higher transfer rates.
Starting with the 80-wire cable defined for use in ATAPI5/UDMA4, the master device goes at the end of the 18-inch (460 mm) cable—the black connector—and the slave device goes on the middle connector—the gray one—and the blue connector goes onto the motherboard. So, if there is only one (master) device on the cable, there is no cable stub to cause reflections. Also, cable select is now implemented in the slave device connector, usually simply by omitting the contact from the connector body.

Master and slave clarification

Although they are in extremely common use, the terms "master" and "slave" do not actually appear in current versions of the ATA specifications. The two devices are simply referred to as "device 0" and "device 1", respectively, in ATA-2 and later.
It is a common myth that the controller on the master drive assumes control over the slave drive, or that the master drive may claim priority of communication over the other device on the channel. In fact, the drivers in the host operating system perform the necessary arbitration and serialization, and each drive's onboard controller operates independently of the other.
The terms "master" and "slave" have not been without controversy. In 2003, the County of Los Angeles, California, US requested that, when possible, supp

No comments:

Post a Comment