Disk controller

A disk controller is a controller circuit that enables a CPU to communicate with a hard disk, floppy disk or other kind of disk drive. It also provides an interface between the disk drive and the bus connecting it to the rest of the system.

Early disk controllers were identified by their storage methods and data encoding. They were typically implemented on a separate controller card. Modified frequency modulation (MFM) controllers were the most common type in small computers, used for both floppy disk and hard disk drives. Run length limited (RLL) controllers used data compression to increase storage capacity by about 50%. Priam created a proprietary storage algorithm that could double the disk storage. Shugart Associates Systems Interface (SASI) was a predecessor to SCSI.

Modern disk controllers are integrated into the disk drive as peripheral controllers. For example, SCSI disks have built-in SCSI controllers. In the past, before most SCSI controller functionality was implemented in a single chip, separate SCSI controllers interfaced disks to the SCSI bus.

These integrated peripheral controllers communicate with a host adapter in the host system over a standardized, high-level storage bus interface. The most common types of interfaces provided nowadays by host controllers are PATA (IDE) and Serial ATA for home use. High-end disks use Parallel SCSI, Fibre Channel or Serial Attached SCSI.

Disk controllers can also control the timing of access to flash memory which is not mechanical in nature (i.e. no spinning disk).

Disk controller versus host adapter
The component that allows a computer to talk to a peripheral bus is a host adapter or host bus adapter (HBA, e.g. Advanced Host Controller Interface or AHDC). A disk controller allows a disk to talk to the same bus. Signals read by a disk read-and-write head are converted by a disk controller, then transmitted over the peripheral bus, then converted again by the host adapter into the suitable format for the motherboard's bus, and then read by the CPU into the memory (RAM).

Sometimes there may be yet another controller between a host adapter and a disk controller - a disk array controller that allows hardware RAID to be formed. Sometimes it may be even physically integrated with an HBA.