Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Parallel ATA
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Interface == Parallel ATA cables transfer data 16 bits at a time. The traditional cable uses 40-pin female [[IDC (electrical connector)|insulation displacement connectors]] (IDC) attached to a 40- or 80-conductor [[ribbon cable]]. Each cable has two or three connectors, one of which plugs into a [[host adapter]] interfacing with the rest of the computer system. The remaining connector(s) plug into storage devices, most commonly hard disk drives or optical drives. Each connector has 39 physical pins arranged into two rows (2.54 mm, {{frac|1|10}}-inch pitch), with a gap or key at pin 20. Earlier connectors may not have that gap, with all 40 pins available. Thus, later cables with the gap filled in are incompatible with earlier connectors, although earlier cables are compatible with later connectors. Round parallel ATA cables (as opposed to ribbon cables) were eventually made available for '[[case mod]]ders' for cosmetic reasons, as well as claims of improved [[computer cooling#Rounded cables|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 a [[Keying (electrical connector)|mechanical key]] and is not used. The pin's socket on the female connector is often blocked, requiring pin 20 to be omitted from the male cable or drive connector; it is thus impossible to plug it in the wrong way round. 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.<ref>{{cite web| url = http://www.transcendusa.com/Support/FAQ/index.asp?axn=Detail&LangNo=0&FAQNo=212| title = Welcome to Transcend website| access-date = 2007-02-01| archive-date = 2011-09-27| archive-url = https://web.archive.org/web/20110927172830/http://www.transcendusa.com/Support/FAQ/index.asp?axn=Detail&LangNo=0&FAQNo=212| url-status = dead}}</ref> ; 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. This enables [[#Cable_select|cable select]] functionality. ; 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, allowing for detection of such a cable. It is attached normally on the gray and black connectors.<ref>{{cite web |url=http://www.t10.org/t13/project/d1321r3-ATA-ATAPI-5.pdf |archive-url=https://web.archive.org/web/20060527053621/http://www.t10.org/t13/project/d1321r3-ATA-ATAPI-5.pdf |url-status=dead |archive-date=2006-05-27 |title=Information Technology - AT Attachment with Packet Interface - 5 (ATA/ATAPI-5) - Working Draft |page=315 |date=2000-02-29 |access-date=2013-08-25}}</ref> === 44-pin variant === A 44-pin variant PATA connector is used for 2.5 inch drives inside laptops. The pins are closer together (2.0 mm pitch) and the connector is physically smaller than the 40-pin connector. The extra pins carry power. === 80-conductor variant === [[file:Samsung HS081HA - 80 pin parallel ATA interface-9696.jpg|thumb|80 pin parallel ATA interface on a 1.8" hard disk]] [[file:ATA cables.jpg|thumb|300px|Comparison between ATA cables: 40-conductor ribbon cable (top), and 80-conductor ribbon cable (bottom). In both cases, a 40-pin female connector is used.]] ATA's cables have had 40 conductors 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-conductor version appeared with the introduction of the ''UDMA/66'' mode. All of the additional conductors in the new cable are [[ground (electricity)|grounds]], interleaved with the signal conductors to reduce the effects of [[capacitive coupling]] between neighboring signal conductors, reducing [[Crosstalk (electronics)|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. Though the number of conductors 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-conductor cable connect a larger number of ground conductors to the ground pins, while the connectors for the 40-conductor cable connect ground conductors to ground pins one-to-one. 80-conductor 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-conductor 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. === Multiple devices on a cable === If two devices are attached to a single cable, one must be designated as ''Device 0'' (in the past, commonly designated ''master'') and the other as ''Device 1'' (in the past, commonly designated as ''slave'').<ref>{{Cite web |date=2020-05-12 |title=An Introduction to Parallel ATA (PATA) - Definition and History |url=https://www.minitool.com/lib/pata.html |access-date=2023-12-12 |website=MiniTool |language=en-US}}</ref> This distinction is necessary to allow both drives to share the cable without conflict. The ''Device 0'' drive is the drive that usually appears "first" to the computer's [[BIOS]] and/or [[operating system]]. In most personal computers the drives are often designated as "C:" for the ''Device 0'' and "D:" for the ''Device 1'' referring to one active primary partitions on each. The mode that a device must use is often set by a [[Jumper (computing)|jumper setting]] on the device itself, which must be manually set to ''Device 0'' (''Master'') or ''Device 1'' (''Slave''). If there is a single device on a cable, it should be configured as ''Device 0''. However, some certain era 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 will often work reliably even though configured as the ''Device 1'' drive (most often seen where an optical drive is the only device on the secondary ATA interface). The words ''primary'' and ''secondary'' typically refers to the two IDE cables, which can have two drives each (primary master, primary slave, secondary master, secondary slave). There are many debates about how much a slow device can impact the performance of a faster device on the same cable. On early ATA host adapters, both devices' data transfers can be constrained to the speed of the slower device, if two devices of different speed capabilities are on the same cable. For all modern ATA host adapters, this is not true, as modern ATA host adapters support ''independent device timing''. This allows each device on the cable to transfer data at its own best speed. Even with earlier adapters without independent timing, this effect applies only to the data transfer phase of a read or write operation.<ref>{{cite web |url=http://www.pcguide.com/ref/hdd/if/ide/confTiming-c.html |title=Independent Master/Slave Device Timing |access-date=2008-08-08 |author=Charles M. Kozierok |date=2001-04-17 |work=The PC Guide}}</ref> This is caused by the omission of both overlapped and queued feature sets from most parallel ATA products. Only one device on a cable can perform a read or write operation at one time; therefore, a fast device on the same cable as a slow device under heavy use will find it has to wait for the slow device to complete its task first. However, most modern devices will report write operations as complete once the data is stored in their onboard cache memory, before the data is written to the (slow) magnetic storage. This allows commands to be sent to the other device on the cable, reducing the impact of the "one operation at a time" limit. The impact of this on a system's performance depends on the application. For example, when copying data from an optical drive to a hard drive (such as during software installation), this effect probably will not matter. Such jobs are necessarily limited by the speed of the optical drive no matter where it is. But if the hard drive in question is also expected to provide good throughput for other tasks at the same time, it probably should not be on the same cable as the optical drive. === 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 ''Device 0'' or ''Device 1'', 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 ''Device 0'' (master) device; if it sees that pin 28 is open, the device becomes the ''Device 1'' (slave) device. This setting is usually chosen by a [[Jumper (computing)|jumper setting]] on the drive called "cable select", usually marked ''CS'', which is separate from the ''Device 0/1'' setting. If two drives are configured as ''Device 0'' and ''Device 1'' 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. In other words, the manual master/slave setting using jumpers on the drives takes precedence and allows them to be freely placed on either connector of the ribbon cable. With the 40-conductor 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 1'' device at the end of the cable, and the master ''Device 0'' on the middle connector. This arrangement eventually was standardized in later versions. However, it had one drawback: if there is just one master device on a 2-drive cable, using the middle connector, 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-conductor cable defined for use in ATAPI5/UDMA4, the master ''Device 0'' device goes at the far-from-the-host end of the {{convert|18|in|mm|adj=on}} cable on the black connector, the slave ''Device 1'' goes on the grey middle connector, and the blue connector goes to the host (e.g. motherboard IDE connector, or IDE card). So, if there is only one (''Device 0'') device on a two-drive cable, using the black connector, there is no cable stub to cause reflections (the unused connector is now in the middle of the ribbon). Also, cable select is now implemented in the grey middle device connector, usually simply by omitting the pin 28 contact from the connector body. === Serialized, overlapped, and queued operations === The parallel ATA protocols up through ATA-3 require that once a command has been given on an ATA interface, it must complete before any subsequent command may be given. Operations on the devices must be serialized{{mdashb}}with only one operation in progress at a time{{mdashb}}with respect to the ATA host interface. A useful mental model is that the host ATA interface is busy with the first request for its entire duration, and therefore can not be told about another request until the first one is complete. The function of serializing requests to the interface is usually performed by a device driver in the host operating system. The ATA-4 and subsequent versions of the specification have included an "overlapped feature set" and a "queued feature set" as optional features, both being given the name "[[Tagged Command Queuing]]" (TCQ), a reference to a set of features from SCSI which the ATA version attempts to emulate. However, support for these is extremely rare in actual parallel ATA products and device drivers because these feature sets were implemented in such a way as to maintain software compatibility with its heritage as originally an extension of the ISA bus. This implementation resulted in excessive CPU utilization which largely negated the advantages of command queuing. By contrast, overlapped and queued operations have been common in other storage buses; in particular, SCSI's version of tagged command queuing had no need to be compatible with APIs designed for ISA, allowing it to attain high performance with low overhead on buses which supported first party DMA like PCI. This has long been seen as a major advantage of SCSI. The [[Serial ATA]] standard has supported [[Native Command Queuing|native command queueing]] (NCQ) since its first release, but it is an optional feature for both host adapters and target devices. Many obsolete PC motherboards do not support NCQ, but modern SATA hard disk drives and SATA [[solid-state drive]]s usually support NCQ, which is not the case for removable (CD/DVD) drives because the ATAPI command set used to control them prohibits queued operations. === HDD passwords and security === {{redirect|ATA Secure Erase|ATA Secure Erase with flash memory|Write amplification#Secure erase|general use|Disk formatting#Recovery of data from a formatted disk}} ATA devices may support an optional security feature which is defined in an ATA specification, and thus not specific to any brand or device. The security feature can be enabled and disabled by sending special ATA commands to the drive. If a device is locked, it will refuse all access until it is unlocked. A device can have two passwords: A User Password and a Master Password; either or both may be set. There is a Master Password identifier feature which, if supported and used, can identify the current Master Password (without disclosing it). The master password, if set, can used by the administrator to reset user password, if the end user forgot the user password. On some laptops and some business computers, their [[BIOS]] can control the ATA passwords.<ref>{{Cite web |url=http://h10032.www1.hp.com/ctg/Manual/c01580453|title=Security User Guide |publisher=HP |location=US |date=June 2008 |id=463798-003 |edition=third}}</ref> A device can be locked in two modes: High security mode or Maximum security mode. Bit 8 in word 128 of the IDENTIFY response shows which mode the disk is in: 0 = High, 1 = Maximum. In High security mode, the device can be unlocked with either the User or Master password, using the "SECURITY UNLOCK DEVICE" ATA command. There is an attempt limit, normally set to 5, after which the disk must be power cycled or hard-reset before unlocking can be attempted again. Also in High security mode, the SECURITY ERASE UNIT command can be used with either the User or Master password. In Maximum security mode, the device can be unlocked only with the User password. If the User password is not available, the only remaining way to get at least the bare hardware back to a usable state is to issue the SECURITY ERASE PREPARE command, immediately followed by SECURITY ERASE UNIT. In Maximum security mode, the SECURITY ERASE UNIT command requires the Master password and will completely erase all data on the disk. Word 89 in the IDENTIFY response indicates how long the operation will take.<ref>{{cite web| url = http://www.rockbox.org/lock.html| title = Rockbox – Unlocking a password protected harddisk}}</ref> While the ATA lock is intended to be impossible to defeat without a valid password, there are purported workarounds to unlock a device.{{Citation needed|date=July 2019}} For [[NVMe]] drives, the security features, including lock passwords, were defined in the [[Opal Storage Specification|OPAL]] standard.<ref>{{cite web | url=https://trustedcomputinggroup.org/resource/tcg-storage-opal-and-nvme/ | title=TCG Storage, Opal, and NVMe }}</ref> For [[Data sanitization|sanitizing]] entire disks, the built-in Secure Erase command is effective when implemented correctly.<ref name="Wei2011">{{ cite q | Q115346857 |url=https://www.usenix.org/legacy/events/fast11/tech/full_papers/Wei.pdf | journal = FAST'11: Proceedings of the 9th USENIX conference on File and storage technologies | access-date = 2018-01-08 | ref = {{sfnref|Wei|2011}} }}</ref> There have been a few reported instances of failures to erase some or all data.<ref>{{cite web |url=http://www.hddoracle.com/viewtopic.php?f=56&t=1412 |title=Beware – When SECURE ERASE doesn't erase at all |publisher=The HDD Oracle |date=2015-11-15 |access-date=2018-01-08}}</ref><ref>{{cite web |url=https://tinyapps.org/docs/wipe_drives_hdparm.html |title=ATA Secure Erase (SE) and hdparm |date=2016-11-06 |access-date=2018-01-08}}</ref><ref name="Wei2011" /> On some laptops and some business computers, their [[BIOS]] can utilize Secure Erase to erase all data of the disk. === External parallel ATA devices === [[file:LG Super Multi GSA-E40N - PATA 2 USB Adapter-8672.jpg|thumb|PATA to USB Adapter. It is mounted on the rear of a DVD-RW optical drive inside an external case]] Due to a short cable length specification and shielding issues it is extremely uncommon to find external PATA devices that directly use PATA for connection to a computer. A device connected externally needs additional cable length to form a U-shaped bend so that the external device may be placed alongside, or on top of the computer case, and the standard cable length is too short to permit this. For ease of reach from motherboard to device, the connectors tend to be positioned towards the front edge of motherboards, for connection to devices protruding from the front of the computer case. This front-edge position makes extension out the back to an external device even more difficult. Ribbon cables are poorly shielded, and the standard relies upon the cabling to be installed inside a shielded computer case to meet RF emissions limits. External hard disk drives or optical disk drives that have an internal PATA interface, use some other interface technology to bridge the distance between the external device and the computer. USB is the most common external interface, followed by Firewire. A bridge chip inside the external devices converts from the USB interface to PATA, and typically only supports a single external device without cable select or master/slave.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)