Floppy-disk controller


A floppy-disk controller is a special-purpose chip and associated disk controller circuitry that directs and controls reading from and writing to a computer's floppy disk drive. This article contains concepts common to FDCs based on the NEC µPD765 and Intel 8272A or 82072A and their descendants, as used in the IBM PC and compatibles from the 1980s and 1990s. The concepts may or may not be applicable to, or illustrative of, other controllers or architectures.

Overview

A single floppy-disk controller board can support up to four floppy disk drives. The controller is linked to the system bus of the computer and appears as a set of I/O ports to the CPU. It is often also connected to a channel of the DMA controller. On the x86 PC the floppy controller uses IRQ 6, on other systems other interrupt schemes may be used. The floppy disk controller usually performs data transmission in direct memory access mode.
The diagram below shows a floppy disk controller which communicates with the CPU via an Industry Standard Architecture bus or similar bus and communicates with the Floppy Disk drive with a 34 pin ribbon cable. An alternative arrangement which is more usual in recent designs has the FDC included in a super I/O chip which communicates via a Low Pin Count bus.
Most of the floppy disk controller functions are performed by the integrated circuit but some are performed by external hardware circuits. The list of functions performed by each is given below.

Floppy disk controller functions (FDC)

The FDC has three I/O ports. These are:
The first two reside inside the FDC IC while the Control port is in the external hardware. The addresses of these three ports are as follows.

Port Address
Port NameLocationPort type
3F5Data portBidirectional I/O
3F4Main status registerFDC ICInput
3F2Digital control portExternal hardwareOutput

Data port

This port is used by the software for three different purposes:
This port is used by the software to read the overall status information regarding the FDC IC and the FDD's. Before initiating a floppy disk operation the software reads this port to confirm the readiness condition of the FDC and the disk drives to verify the status of the previously initiated command. The different bits of this register represent :

BitRepresentation
0FDD 0: Busy in seek mode
1FDD 1: Busy in seek mode
2FDD 2: Busy in seek mode
3FDD 3: Busy in seek mode
4FDC Busy; Read/Write command in progress
5Non-DMA mode
6DIO; Indicates the direction of data transfer between the FDC IC and the CPU
7MQR; Indicates data register is ready for data transfer



Explanations
MQR1 = data register ready, 0 = data register not ready
DIO1 = controller has data for CPU, 0 = controller expecting data from CPU
Non-DMA1 = Controller Not in DMA Mode, 0 = Controller in DMA Mode
FDC Busy1 = Busy, 0 = Not Busy
FDD 0,1,2,31 = Running, 0 = Not Running

Digital control port

This port is used by the software to control certain FDD and FDC IC functions. The bit assignments of this port are:

BitRepresentation
0 and 1Device number to be selected
2RESET FDC IC
3Enable FDC interrupt and DMA request signals
4 to 7Turn ON the motor in disk drive 0, 1, 2 or 3 respectively

Interface to the floppy disk drive

The controller connects to the drive using a flat ribbon cable with 34 connectors split between the host, the 3.5" drive, and the 5.25" drive. This type of cable is called a universal connector. In the IBM PC family and compatibles, a twist in the cable is used to distinguish disk drives by the socket to which they are connected. All drives are installed with the same drive select address set, and the twist in the cable interchange the drive select line at the socket. The drive that is at furthest end of the cable additionally would have a terminating resistor installed to maintain signal quality.

Format data

Many mutually incompatible floppy disk formats are possible; aside from the physical format on the disk, incompatible file systems are also possible.
DriveFormatCapacityTransfer
speed
[kbit/s]
RPMTracksTPIComment
8-inch SD8-inch SD80 KB33.3333603248Only on old controllers.
5.25-inch SD5.25-inch SD160 KB12540Only on old controllers.
5.25-inch SSDD5.25-inch SSDD171 KB3003548Only on C1541 compatibles.
5.25-inch SD5.25-inch SD180 KB15040Only on old controllers.
5.25-inch DD5.25-inch DD320/360/400 KB25030040488/9/10 512 byte sectors respectively.
5.25-inch DD 5.25-inch QD 800 KB2503008096
5.25-inch HD5.25-inch DD360 KB3003604048
5.25" HD5.25" HD1200 KB5003608096Up to 83 tracks. Different biasing current.
5.25" HD5.25" HD720 KB30036080Up to 83 tracks.
3.5" DD3.5" DD720 KB25030080135Up to 83 tracks.
3.5" DD3.5" DD800 KB394-59080Used by Apple Macintosh.
3.5" DD3.5" DD800 KB25030080Used by Commodore 1581.
3.5" DD3.5" DD880 KB25030080Up to 83 tracks. Used by Amiga computers.
3.5" DD3.5" DD360 KB25030040
3.5" HD3.5" DD720 KB25030080Up to 83 tracks.
3.5" HD3.5" HD1440 KB50030080135Up to 83 tracks.
3.5" HD3.5" HD1760 KB25015080Used by Amiga computers.
3.5" ED3.5" ED2880 KB100030080135Up to 83 tracks.

Sides:
Density:
Primarily in Japan there are 3.5" high-density floppy drives that support three modes of disk formats instead of the normal two – 1440 KB, 1.2 MB and 720 kB. Originally, the high-density mode for 3.5" floppy drives in Japan only supported a capacity of instead of the capacity that was used elsewhere. While the more common 1440 KB format spun at 300 rpm, the 1.2 MB format instead spun at 360 rpm, thereby closely resembling the 1.2 MB format with 15 sectors per track previously found on 5.25" high-density floppy drives. Later Japanese floppy drives incorporated support for both high-density formats, hence the name 3-mode. Some BIOSes have a configuration setting to enable this mode for floppy drives supporting it.