Alasir Enterprises
Main Page >  Motley >  MicroHouse PC Hardware Library Volume I: Hard Drives  

 
Previous Table of Contents Next

 
When only one drive is installed, the controller responds to all commands from the system. When two drives (and, therefore, two controllers) are installed, all commands from the system are received by both controllers. Each controller then must be set up to respond only to commands for itself. In this situation, one controller then must be designated as the master and the other as the slave. When the system sends a command for a specific drive, the controller on the other drive must remain silent while the selected controller and drive are functioning. Setting the jumper to master or slave allows discrimination between the two controllers by setting a special bit (the DRV bit) in the Drive/Head Register of a command block.

ATA I/O Connector

The ATA interface connector is a 40-pin header-type connector that should be keyed to prevent the possibility of installing it upside down. A key is provided by the removal of pin 20, and the corresponding pin on the cable connector should be plugged in to prevent a backward installation. The use of keyed connectors and cables is highly recommended, because plugging an IDE cable in backward can damage both the drive and the bus adapter circuits (although I have done it myself many times with no smoked parts yet!).

Table 2.1 shows the ATA-IDE interface connector pinout.

Table 2.1  ATA Connector.

Signal Name Pin Pin Signal Name

-RESET 1 2 GROUND
Data Bit 7 3 4 Data Bit 8
Data Bit 6 5 6 Data Bit 9
Data Bit 5 7 8 Data Bit 10
Data Bit 4 9 10 Data Bit 11
Data Bit 3 11 12 Data Bit 12
Data Bit 2 13 14 Data Bit 13
Data Bit 1 15 16 Data Bit 14
Data Bit 0 17 18 Data Bit 15
GROUND 19 20 KEY (pin missing)
DRQ 3 21 22 GROUND
-IOW 23 24 GROUND
-IOR 25 26 GROUND
I/O CH RDY 27 28 SPSYNC:CSEL
-DACK 3 29 30 GROUND
IRQ 14 31 32 -IOCS16
Address Bit 1 33 34 -PDIAG
Address Bit 0 35 36 Address Bit 2
-CS1FX 37 38 -CS3FX
-DA/SP 39 40 GROUND
+5 Vdc (Logic) 41 42 +5 Vdc (Motor)
GROUND 43 44 -TYPE (0=ATA)

ATA I/O Cable

A 40-conductor ribbon cable is specified to carry signals between the bus adapter circuits and the drive (controller). To maximize signal integrity and to eliminate potential timing and noise problems, the cable should not be longer than 0.46 meters (18 inches).

ATA Signals

This section describes some of the most important signals in more detail.

Pin 20 is used as a key pin for cable orientation and is not connected through in the interface. This pin should be missing from any ATA connectors, and the cable should have the pin-20 hole in the connector plugged off to prevent the cable from being plugged in backward.

Pin 39 carries the Drive Active/Slave Present (DASP) signal, which is a dual-purpose, time-multiplexed signal. During power-on initialization, this signal indicates whether a slave drive is present on the interface. After that, each drive asserts the signal to indicate that it is active. Early drives could not multiplex these functions and required special jumper settings to work with other drives. Standardizing this function to allow for compatible dual-drive installations is one of the features of the ATA standard.

Pin 28 carries the Cable Select or Spindle Synchronization signal (CSEL or SPSYNC), which is a dual-purpose conductor. A given installation, however, may use only one of the two functions. The CSEL function is the most widely used and is designed to control the designation of a drive as master (drive 0) or slave (drive 1) without requiring jumper settings on the drives. If a drive sees the CSEL as being grounded, the drive is a master. If CSEL is open, the drive is a slave.

You can install special cabling to ground CSEL selectively. This installation normally is accomplished through a Y-cable arrangement, with the IDE bus connector in the middle and each drive at opposite ends of the cable. One leg of the Y has the CSEL line connected through, indicating a master drive. The other leg has the CSEL line open (conductor interrupted or removed), making the drive at that end the slave.

ATA Commands

One of the best features of the ATA IDE interface is the enhanced command set. The ATA IDE interface was modeled after the WD1003 controller that IBM used in the original AT system. All ATA IDE drives must support the original WD command set (eight commands), with no exceptions, which is why IDE drives are so easy to install in systems today. All IBM-compatible systems have built-in ROM BIOS support for the WD1003, which means that essentially, they support ATA IDE 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 what type of drive is connected, including the drive manufacturer, model number, operating parameters, and even the serial number of the drive. Many modern BIOSs 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 or she used during setup.

Previous Table of Contents Next