ATA Commands Set

One of the best features of the ATA (also known as IDE) interface is the enhanced command set. The ATA interface was modeled after the WD1003 controller IBM used in the original AT system.

All ATA drives must support the original WD command set (eight commands) with no exceptions, which is why ATA drives are so easy to install in systems today. All IBM-compatible systems have built-in ROM BIOS support for the WD1003, so they essentially support ATA as well.

In addition to supporting all the WD1003 commands, the ATA specification added numerous other commands to enhance performance and capabilities. These commands are an optional part of the ATA interface, but several of them are used in most drives available today and are very important to the performance and use of ATA drives in general.

Perhaps the most important is the Identify Drive command. This command causes the drive to transmit a 512-byte block of data that provides all details about the drive.

Through this command, any program (including the system BIOS) can find out exactly which type of drive is connected, including the drive manufacturer, model number, operating parameters, and even the serial number of the drive.

Many modern BIOSes use this information to automatically receive and enter the drive's parameters into CMOS memory, eliminating the need for the user to enter these parameters manually during system configuration.

This arrangement helps prevent mistakes that can later lead to data loss when the user no longer remembers what parameters he used during setup. The Identify Drive data can tell you many things about your drive, including the following:

  • Number of logical block addresses available using LBA mode

  • Number of physical cylinders, heads, and sectors available in P-CHS mode

  • Number of logical cylinders, heads, and sectors in the current translation L-CHS mode

  • Transfer modes (and speeds) supported

  • Manufacturer and model number

  • Internal firmware revision

  • Serial number

  • Buffer type/size, indicating sector buffering or caching capabilities

Several public-domain programs can execute this command to the drive and report the information onscreen. In the past, I've used the IDEINFO. However, because this program was created almost a decade ago, it doesn't provide the best information about recent drives.

For more up-to-date information, use IDEDIAG, or HWINFO. (I find these programs especially useful when I am trying to install ATA drives on a system that has a user-defined drive type but doesn't support autodetection and I need to know the correct parameters for a user-definable BIOS type. These programs get the information directly from the drive.)

Two other important commands are the Read Multiple and Write Multiple commands. These commands permit multiple-sector data transfers and, when combined with block-mode PIO capabilities in the system, can result in incredible data-transfer rates many times faster than single-sector PIO transfers.

Some older systems require you to select the correct number of sectors supported by the drive, but most recent systems automatically determine this information for you.

Many other enhanced commands are available, including room for a given drive manufacturer to implement what are called vendor-unique commands. Certain vendors often use these commands for features unique to that vendor.

Often, vendor-unique commands control features such as low-level formatting and defect management. This is why low-level format programs can be so specific to a particular manufacturer's ATA drives and why many manufacturers make their own LLF programs available.