Here is the pin assignment for the ATA (also known as IDE) interface for the hard disk in a portable computer (laptop or notebook). The pinout for a desktop is the same, but uses only the first 40 pins. Also beware that the laptop connector is mechanically different: the pins are more closely spaced, as compared to the desktop connector. This makes it harder than you might have guessed to attach a laptop-style disk to your desktop machine ... although it is certainly possible to make or buy an adapter.
pin assignment pin assignment 1 -Reset 2 GND 3 Data 7 4 Data 8 5 Data 6 6 Data 9 7 Data 5 8 Data 10 9 Data 4 10 Data 11 11 Data 3 12 Data 12 13 Data 2 14 Data 13 15 Data 1 16 Data 14 17 Data 0 18 Data 15 19 GND 20 Key (no pin) 21 (reserved) 22 GND 23 -IOW 24 GND 25 -IOR 26 GND 27 IO Chrdy 28 Ale 29 (reserved) 30 GND 31 IRQ14 32 -IOCS16 33 Addr 1 34 (reserved) 35 Addr 0 36 Addr 2 37 -CS0 (1F0-1F7) 38 -CS1 (3f6-3f7) 39 -Active 40 GND 41 +5VDC (logic) 42 +5VDC (motor) 43 GND 44 Type (0==ATA)
The disks are male; the cables are female. Pin 1 is traditionally on the top side (i.e. label side) of the disk, on the right as you face the drive, as marked with a “v” in the diagram below.
For desktops (40 pin connector) the master/slave jumper pinout is definitely nonstandard; check your disk to see if the scheme is printed on it. Otherwise track down the documentation for your disk.
For laptops (44 pin connector) the master/slave jumper scheme given below seems to be pretty common, although I wouldn’t be surprised to find others. Looking at the pins, we have:
v ...................... .. device 0 ............ ......... .. i.e. master v ...................... .| device 1 ............ ......... .| i.e. slave v ...................... .. cable select ............ ......... ==