Floppy disk controller
Encyclopedia
A floppy disk controller (FDC) is a special-purpose chip and associated disk controller
Disk controller
The disk controller is the circuit which enables the CPU to communicate with a hard disk, floppy disk or other kind of disk drive.Early disk controllers were identified by their storage methods and data encoding. They were typically implemented on a separate controller card...

 circuitry that directs and controls reading from and writing to a computer's
Computer
A computer is a programmable machine designed to sequentially and automatically carry out a sequence of arithmetic or logical operations. The particular sequence of operations can be changed readily, allowing the computer to solve more than one kind of problem...

 floppy disk drive
Floppy disk
A floppy disk is a disk storage medium composed of a disk of thin and flexible magnetic storage medium, sealed in a rectangular plastic carrier lined with fabric that removes dust particles...

 (FDD). This article contains concepts common to FDCs based on the NEC µPD765 and Intel 8072A or 82072A and their descendants, as used in the IBM PC
Personal computer
A personal computer is any general-purpose computer whose size, capabilities, and original sales price make it useful for individuals, and which is intended to be operated directly by an end-user with no intervening computer operator...

 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 disc controller (FDC) board can support up to four floppy disk drives. The controller is linked to the system bus
System bus
A system bus is a single computer bus that connects the major components of a computer system. The technique was developed to reduce costs and improve modularity....

 of the computer
Computer
A computer is a programmable machine designed to sequentially and automatically carry out a sequence of arithmetic or logical operations. The particular sequence of operations can be changed readily, allowing the computer to solve more than one kind of problem...

 and appears as a set of I/O
Input/output
In computing, input/output, or I/O, refers to the communication between an information processing system , and the outside world, possibly a human, or another information processing system. Inputs are the signals or data received by the system, and outputs are the signals or data sent from it...

 ports to the CPU
Central processing unit
The central processing unit is the portion of a computer system that carries out the instructions of a computer program, to perform the basic arithmetical, logical, and input/output operations of the system. The CPU plays a role somewhat analogous to the brain in the computer. The term has been in...

. It is often also connected to a channel of the DMA
Direct memory access
Direct memory access is a feature of modern computers that allows certain hardware subsystems within the computer to access system memory independently of the central processing unit ....

 controller. On the x86 PC the floppy controller uses IRQ
Interrupt request
The computing phrase "interrupt request" is used to refer to either the act of interrupting the bus lines used to signal an interrupt, or the interrupt input lines on a Programmable Interrupt Controller...

 6, on other systems other interrupt
Interrupt
In computing, an interrupt is an asynchronous signal indicating the need for attention or a synchronous event in software indicating the need for a change in execution....

 schemes may be used. The floppy disc controller usually performs data transmission in direct memory access
Direct memory access
Direct memory access is a feature of modern computers that allows certain hardware subsystems within the computer to access system memory independently of the central processing unit ....

 (DMA) mode.

The diagram below shows an floppy disc controller which communicates with the CPU via an Industry Standard Architecture
Industry Standard Architecture
Industry Standard Architecture is a computer bus standard for IBM PC compatible computers introduced with the IBM Personal Computer to support its Intel 8088 microprocessor's 8-bit external data bus and extended to 16 bits for the IBM Personal Computer/AT's Intel 80286 processor...

 (ISA) bus. An alternative arrangement which is more usual in recent designs has the FDC included in a super I/O
Super I/O
Super I/O is a class of I/O controller integrated circuits that began to be used on personal computer motherboards in the late 1980s, originally as add-in cards, later embedded on the motherboards. A super I/O chip combines interfaces for a variety of low-bandwidth devices...

 chip which communicates via a Low Pin Count
Low Pin Count
The Low Pin Count bus, or LPC bus, is used on IBM-compatible personal computers to connect low-bandwidth devices to the CPU, such as the boot ROM and the "legacy" I/O devices . The "legacy" I/O devices usually include serial and parallel ports, PS/2 keyboard, PS/2 mouse, floppy disk controller...

 (LPC) bus.
Most of the floppy disc controller (FDC) functions are performed by the integrated circuit
Integrated circuit
An integrated circuit or monolithic integrated circuit is an electronic circuit manufactured by the patterned diffusion of trace elements into the surface of a thin substrate of semiconductor material...

 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
    Modified Frequency Modulation
    Modified Frequency Modulation, commonly MFM, is a line coding scheme used to encode the actual data-bits on most floppy disk formats, hardware examples include Amiga, most CP/M machines as well as IBM PC compatibles. Early hard disk drives also used this coding.MFM is a modification to the original...

     or GCR
    Group Code Recording
    In computer science, group code recording refers to several distinct but related encoding methods for magnetic media. The first, used in 6250 cpi magnetic tape, is an error-correcting code combined with a run length limited encoding scheme...

     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
    Cyclic redundancy check
    A cyclic redundancy check is an error-detecting code commonly used in digital networks and storage devices to detect accidental changes to raw data...

  • Synchronize data with phase-locked loop
    Phase-locked loop
    A phase-locked loop or phase lock loop is a control system that generates an output signal whose phase is related to the phase of an input "reference" signal. It is an electronic circuit consisting of a variable frequency oscillator and a phase detector...

     (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 disc controller (FDC)
  • Data separation logic
  • Write pre-compensation
    Write precompensation
    Write precompensation is a technical aspect of hard disk design. It is the use of a stronger magnetic field to write data in sectors that are closer to the center of the disk...

     logic
  • Line driver
    Line driver
    In electronics, a line driver is an amplifier used to improve the strength of an analog or digital signal at its source by driving the input to the transmission line with a higher than normal signal level. This increases the quality of a transmission over a long run of cable...

    s for signals to the controller
  • Line receivers for signals from the controller

Input / Output ports

The FDC has three I/O
I/O
I/O may refer to:* Input/output, a system of communication for information processing systems* Input-output model, an economic model of flow prediction between sectors...

 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
Hardware
Hardware is a general term for equipment such as keys, locks, hinges, latches, handles, wire, chains, plumbing supplies, tools, utensils, cutlery and machine parts. Household hardware is typically sold in hardware stores....

. The addresses of these three ports are as follows.
Port Address
[hex]
Port Name Location Port Type
3F5 Data Register FDC IC Bidirectional I/O
3F4 Main Status Register FDC IC Input
3F2 Digital Control Port External Hardware Output


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



Explanations
MQR 1 = data register ready, 0 = data register not ready
DIO 1 = controller has data for CPU, 0 = controller expecting data from CPU
Non-DMA 1 = Controller Not In DMA Mode, 0 = Controller In DMA Mode
FDC Busy 1 = Busy, 0 = Not Busy
FDD 0,1,2,3 1 = 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:
Bit Representation
0 and 1 Device number to be selected
2 RESET FDC IC (Low)
3 Enable FDC interrupt and DMA request signals
4 to 7 Turn ON the motor in disk drive 0, 1, 2 or 3 respectively


Format data

Drive Format Capacity Transfer
speed
[kbit/s]
RPM
Revolutions per minute
Revolutions per minute is a measure of the frequency of a rotation. It annotates the number of full rotations completed in one minute around a fixed axis...

 
Tracks TPI
Tracks per inch
Tracks per inch is a measure of magnetic resolution, in particular the number of individual tracks a floppy disk controller can use within a linear one-inch space.* 48 tpi* 96/100 tpi...

 
Comment
8" SD 8" SD 80 kB 33.333 360 32 48 Only on old controllers.
5.25" SD 5.25" SD 160 kB 125 40 Only on old controllers.
5.25" SD 5.25" SD 171 kB 35 Only on C1541
Commodore 1541
The Commodore 1541 , made by Commodore International, was the best-known floppy disk drive for the Commodore 64 home computer. The 1541 was a single-sided 170 kilobyte drive for 5¼" disks...

 compatibles.
5.25" SD 5.25" SD 180 kB 150 40 Only on old controllers.
5.25" DD 5.25" DD 360 kB 250 300 40
5.25" HD 5.25" DD 360 kB 300 360 40 48
5.25" HD 5.25" HD 1.2 MB 500 360 80 96 Up to 83 tracks. Different biasing current.
5.25" HD 5.25" HD 720 kB 300 360 80 Up to 83 tracks.
3.5" DD 3.5" DD 720 kB 250 300 80 135 Up to 83 tracks.
3.5" DD 3.5" DD 800 kB 250 300 80 Used by C1581
Commodore 1581
The Commodore 1581 is a 3½ inch double sided double density floppy disk drive made by Commodore Business Machines primarily for its C64 and C128 home/personal computers. The drive stores 800 kilobytes using an MFM encoding but format different from both MS-DOS , and the Amiga formats. With...

.
3.5" DD 3.5" DD 880 kB 250 300 80 Up to 83 tracks. Used by Amiga
Amiga
The Amiga is a family of personal computers that was sold by Commodore in the 1980s and 1990s. The first model was launched in 1985 as a high-end home computer and became popular for its graphical, audio and multi-tasking abilities...

 computers.
3.5" DD 3.5" DD 360 kB 250 300 40
3.5" HD 3.5" DD 720 kB 250 300 80 Up to 83 tracks.
3.5" HD 3.5" HD 1.44 MB 500 300 80 135 Up to 83 tracks.
3.5" HD 3.5" HD 1.76 MB 250 300 80 Used by Amiga
Amiga
The Amiga is a family of personal computers that was sold by Commodore in the 1980s and 1990s. The first model was launched in 1985 as a high-end home computer and became popular for its graphical, audio and multi-tasking abilities...

 computers.
3.5" ED 3.5" ED 2.88 MB 1000 300 80 135 Up to 83 tracks.


Sides:
  • SS - Single sided
    Double-sided disk
    In computer science, a double-sided disk is a disk of which both sides are used to store data.Early floppy disks only used one surface for recording. The term "single sided disk" was not common until the introduction of double-sided disks, which offered double the capacity in the same physical size...

  • DS - Double sided
    Double-sided disk
    In computer science, a double-sided disk is a disk of which both sides are used to store data.Early floppy disks only used one surface for recording. The term "single sided disk" was not common until the introduction of double-sided disks, which offered double the capacity in the same physical size...



Density:
  • SD - Single density
    Single density
    Single density, often shortened SD, is a capacity designation on magnetic storage, usually floppy disks. It describes the use of an encoding of information using Frequency modulation, also known as biphase mark code....

     (FM
    Frequency modulation
    In telecommunications and signal processing, frequency modulation conveys information over a carrier wave by varying its instantaneous frequency. This contrasts with amplitude modulation, in which the amplitude of the carrier is varied while its frequency remains constant...

    )
  • DD - Double density
    Double density
    Double density, often shortened DD, is a capacity designation on magnetic storage, usually floppy disks. It describes the use of an encoding of information, which can encode on average twice as many bits per time unit compared to single density...

     (MFM
    Modified Frequency Modulation
    Modified Frequency Modulation, commonly MFM, is a line coding scheme used to encode the actual data-bits on most floppy disk formats, hardware examples include Amiga, most CP/M machines as well as IBM PC compatibles. Early hard disk drives also used this coding.MFM is a modification to the original...

    )
  • HD - High density
  • ED - Extended density (Perpendicular recording)


Floppy 3 mode

Primarily in Japan
Japan
Japan is an island nation in East Asia. Located in the Pacific Ocean, it lies to the east of the Sea of Japan, China, North Korea, South Korea and Russia, stretching from the Sea of Okhotsk in the north to the East China Sea and Taiwan in the south...

 there are 3,5" floppy drives that support 3 modes of disk formats - 1.44MB, 1.2MB and 720kB. Hence the name "Floppy 3 mode". Some BIOS
BIOS
In IBM PC compatible computers, the basic input/output system , also known as the System BIOS or ROM BIOS , is a de facto standard defining a firmware interface....

have this setting. If your floppy drive is a Japanese 3-mode type. Then you must enable this setting for that drive to make it work correctly.
Originally the high-density mode for 3,5" floppy drives in Japan only supported capacity unlike the capacity that is used elsewhere.

Further reading

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK