Rahul Sharma (Editor)

Floppy disk controller

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit
Floppy-disk controller

A floppy-disk controller (FDC) 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 (FDD). 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.

Contents

Overview

A single floppy-disk controller (FDC) 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 (DMA) mode.

The diagram below shows a floppy disk controller which communicates with the CPU via an Industry Standard Architecture (ISA) bus. 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 (LPC) bus.

Most of the floppy disk controller (FDC) 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)

  • Translate data bits into MFM or GCR format to be able to record them
  • Interpret and execute commands such as seek, read, write, format, etc.
  • Error detection with checksums generation and verification, like CRC
  • Synchronize data with phase-locked loop (PLL)
  • External hardware functions

  • Selection of floppy disk drive (FDD)
  • Switching-on the floppy drive motor
  • Reset signal for the floppy controller IC
  • Enable/disable interrupt and DMA signals in the floppy disk controller (FDC)
  • Data separation logic
  • Write pre-compensation logic
  • Line drivers for signals to the controller
  • Line receivers for signals from the controller
  • Input/output ports for common x86-PC controller

    The FDC has three I/O ports. These are:

  • Data port
  • Main status register (MSR)
  • Control port
  • 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.

    Data port

    This port is used by the software for three different purposes:

  • While issuing a command to the FDC IC, command and command parameter bytes are issued to the FDC IC through this port. The FDC IC stores the different parameters and the command in its internal registers.
  • After a command is executed, the FDC IC stores a set of status parameters in the internal registers. These are read by the CPU through this port. The different status bytes are presented by the FDC IC in a specific sequence.
  • In the programmed and interrupt mode of data transfer, the data port is used for transferring data between the FDC IC and the CPU IN or OUT instruction.
  • Main status register (MSR)

    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 :

    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:

    Format data

    Many mutually incompatible floppy disk formats are possible; aside from the physical format on the disk, incompatible file systems are also possible.

    Sides:

  • SS – Single sided
  • DS – Double sided
  • Density:

  • SD – Single density (FM)
  • DD – Double density (MFM)
  • HD – High density
  • ED – Extended density
  • "3mode" floppy drive

    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 (2 MB unformatted), 1.2 MB (1.6 MB unformatted) and 720 kB (1 MB unformatted). Originally, the high-density mode for 3.5" floppy drives in Japan only supported a capacity of 1.2 MB instead of the 1440 KB 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 (as well as the double-density format), hence the name 3mode. Some BIOSes have a configuration setting to enable this mode for floppy drives supporting it.

    References

    Floppy-disk controller Wikipedia