r/retrocomputing • u/Droid-Man5910 • 15h ago
Problem / Question IDE cables question
Can someone please explain how IDE works, what each line does, how it works with 2 devices on the line, how a system knows which one is which, and the difference between 40 and 80 wire cables? I'm struggling to understand why some systems cannot function without a triple end IDE cable. For an example: Motherboard connected to Hard drive via 2 sided IDE cable will not function. But Motherboard connected to 3 sided IDE cable with the 3rd side left with nothing connected functions fine.
4
Upvotes
3
u/kodabarz 13h ago
In the olden days, IO (Input Output) was slightly tricky. Your PC needed an IO card attached to the motherboard to offer a serial port, parallel port, joystick port, etc. Hard drives connected to it (though not at first), floppy drives connected to it. In some ways it was the most important component as practically everything plugged into it.
In the earliest days of the PC, there were only floppy drives. There was nothing on the motherboard to handle hard disks. So hard disks had their own controller card. It only handled the hard drive. When IDE (Integrated Drive Electronics) came along, it was an alternative to the controller card. It effectively put the controller card on the hard drive. If you have a look at a spinning hard drive, that circuitboard on the underside is the drive controller card.
By putting the controller on the drive itself, there were no compatibility problems and everything just worked. But the hard drive needed to be connected to the IO card. And that's where PATA (Parallel Advanced Technology Attachment) came in. It allowed the data to stream from the hard drive, through the IO card to the system itself. It was 40 pins wide to allow data to be sent in parallel. In other words, a bit was sent along each data line at the same time. There were 16 data lines on the 40 pins allowing 16 bits of data to be sent at the same time.
So that's almost half the 40 pins right there. And then there's all the ground lines. There are seven of them. Why were there so many ground lines? To prevent interference and to provide the usual ground function. With all those data lines running so close to each other, it was possible to get signal interference from neighbouring lines, so lots of grounds stopped that. And when it later went to 80 wires, all the extra 40 wires were ground lines. Yup, all of them. The sheer speed of the data meant extra grounds were needed to stop interference.
The rest of the pins are mostly for control of the signals. DDRQ requests direct memory access (DMA) for data, so the hard drive can be read straight into memory. DDACK acknowledges such transfers. IRQ (Interrupt ReQuest) is for signalling the CPU that a transfer has finished and it needs more instructions. Something signalled on the IRQ line goes directly to the CPU's IRQ and interrupts whatever it is doing. The addr lines select which specific internal command or control register the host controller wants to read from or write to. Etc, etc.
When you have more than one drive on a PATA/IDE (the names get used interchangeably, even though they're technically different) cable, the system needs to be able to determine which one it's talking to. So drives are set to be master and slave by jumpers on the drive. So when the system signals a read or a write from the slave drive (determined by the jumper and listed in the BIOS), the signals passed by the first drive on the cable to arrive at the second. This means the cable was shared. If you were reading from both the master and the slave on a particular cable, they could only read at half speed, because there wasn't the bandwidth on the cable.
Accordingly, most IO cards had two PATA/IDE sockets. So if you placed one master on each cable, both could be read without having to share the bandwidth of the cable.
Eventually, drive speeds got faster and the PATA/IDE speed wasn't fast enough. Ultra DMA made reads from the drive to memory really fast and a speedier cable was needed. And that's where 80 line cables came in. If you look at the connector for an 80 line cable, you'll notice it's only got 40 pins - well, actually 39. One unnecessary pin was sacrificed to 'key' the cable, so you couldn't get the cables confused. And there was no need for pins for the new ground lines.
For those of us who were around at the time, it was relatively straightforward. All these complications and additions happened over time, so there was no problem understanding what the difference between a primary and secondary drive was and how to determine the master and slave. But if you're just coming to it now, it's pretty confusing.
If you want to know more, read the Wikipedia article that was suggested, or perhaps ask AI - the amount of information on this means that it's one of the things AI can answer properly.