Академический Документы
Профессиональный Документы
Культура Документы
FLOPPY DRIVES
The ability to interchange programs and data between various compatible computers
is a fundamental requirement of almost every computer system. This kind of file-
exchange compatibility helped rocket IBM PC/XTs into everyday use and spur the
personal computer industry into the early 1980s. A standardized operating system, file
structure, and recording media also breathed life into the fledgling software industry.
With the floppy disk, software developers could finally distribute programs and data
to a mass-market of compatible computer users. The mechanism that allowed this
quantum leap in compatibility is the floppy-disk drive.
A floppy-disk drive (FDD) is one of the least expensive and most reliable forms of
mass storage ever used in computer systems. Virtually every one of the millions of
personal computers sold each year incorporates at least one floppy drive. Most
notebook and laptop computers also offer a single floppy drive. Not only are FDDs
useful for transferring files and data between various systems, but the advantage of
removable media—the floppy disk itself—make floppy drives an almost intuitive
backup system for data files. Although floppy drives have evolved through a number
of iterations: from 8" to 5.25" to 3.5", their basic components and operating principles
have changed very little.
Magnetic-Storage Concepts
Magnetic-storage media has been attractive to computer designs for many years—
long before the personal computer had established itself in homes and offices. This
popularity is primarily because magnetic media is non-volatile. Unlike system RAM,
no electrical energy is needed to maintain the information once it is stored on
magnetic media. Although electrical energy is used to read and write magnetic data,
magnetic fields do not change on their own, so data remains intact until “other forces”
act upon it (such as another floppy drive). It is this smooth, straightforward translation
from electricity to magnetism and back again that has made magnetic storage such a
natural choice. To understand how a floppy drive works and why it fails, you should
have an understanding of magnetic storage.
MEDIA
Media is the physical material that actually holds recorded information. In a floppy
disk, the media is a small mylar disk coated on both sides with a precisely formulated
magnetic material, often referred to as the oxide layer. Every disk manufacturer uses
their own particular formula for magnetic coatings, but most coatings are based on a
naturally magnetic element (such as iron, nickel, or cobalt) that has been alloyed with
non-magnetic materials or rare earth. This magnetic material is then compounded with
plastic, bonding chemicals, and lubricant to form the actual disk media. The
fascinating aspect of these magnetic layers is that each and every particle media acts
NetPro Certification Courseware for NetPro Certified Systems Engineer – N.C.S.E
accessed. This failure mode also occurs in hard drives. Little can be done to ensure
the integrity of floppy disks, aside from maintaining one or more backups on freshly
formatted disks. However, some commercial software is available for restoring disk
data (especially hard drives).
The first step in understanding digital recording is to see how binary data is stored on
a disk. Binary 1s and 0s are not represented by discrete polarities of magnetic field
orientations as you might have thought. Instead, binary digits are represented by the
presence or absence of flux transitions. By detecting the change from one polarity to
another, instead of simply detecting a discrete polarity itself, maximum sensitivity can
be achieved with very simple circuitry. In its simplest form, logic 1 is indicated by the
presence of a flux reversal within a fixed time frame, but logic 0 is indicated by the
absence of a flux reversal. Most floppy drive systems insert artificial flux reversals
between consecutive 0s to prevent reversals from occurring at great intervals. You can
see some example magnetic states recorded on the media of Figure 1. Notice that the
direction of reversal does not matter—it is the reversal event that defines a 1 or 0. For
example, the first 0 uses left-to-right orientation, the second 0 uses a right-to-left
orientation, but both can represent 0s. Each bit is usually encoded in about 4 µs.
Often, the most confusing aspect to flux transitions is the artificial reversals. Why
reverse the polarities for consecutive 0s? Artificial reversals are added to guarantee
synchronization in the floppy-disk circuitry. Remember that data read or written to a
floppy disk is serial; without any clock signal, such serial data is asynchronous of the
drive’s circuitry. Regular flux reversals (even if added artificially) create reference
pulses that help to synchronize the drive and data without use of clocks or other
timing signals. This approach is loosely referred to as the Modified Frequency
Modulation (MFM) recording technique. Early hard drives (e.g. ST506/412 drives)
also used MFM recording. The ability of floppy disks to store information depends
upon being able to write new magnetic field polarities on top of old or existing
orientations. A drive must also be able to sense the existing polarities on a disk during
read operations. The mechanism responsible for translating electrical signals into
magnetic signals (and vice versa) is the read/write head (R/W head). In principle, a
NetPro Certification Courseware for NetPro Certified Systems Engineer – N.C.S.E
head is little more than a coil of very fine wire wrapped around a soft, highly
permeable core material (Fig. 2).
When the head is energized with current flow from a driver IC, a path of magnetic
flux is established in the head core.
The direction (or orientation) of flux depends on the direction of energizing current.
To reverse a head’s magnetic orientation, the direction of energizing current must be
reversed. The small head size and low current levels needed to energize a head allow
very high-frequency flux reversals. As magnetic flux is generated in a head, the
resulting, tightly focused magnetic field aligns the floppy disk’s particles at that point.
In general, the current signal magnetizes an almost microscopic area on the media.
R/W heads actually contact the media while a disk is inserted into a drive. During a
read operation, the heads are left un-energized while the disk spins. Just as varying
current produces magnetism in a head, the reverse is also true—varying magnetic
influences cause currents to be developed in the head(s). As the spinning media
moves across a R/W head, a current is produced in the head coil. The direction of
induced current depends on the polarity of each flux orientation. Induced current is
proportional to the flux density (how closely each flux transition is placed) and the
velocity of the media across each head. In other words, signal strength depends on the
rate of change of flux versus time.
NetPro Certification Courseware for NetPro Certified Systems Engineer – N.C.S.E
Every track is divided into smaller units called sectors. There are 18 sectors on every
track of an 3.5” disk. Sectors serve two purposes. First, a sector stores 512 bytes of
data. With 18 sectors per track and 160 tracks per disk, an 8.89-cm disk holds 2880
sectors (18 × 160). At 512 bytes per sector, a formatted disk can handle about (2880
× 512) = 1,474,560 bytes of data. In actuality, this amount is often slightly less to
allow for boot sector and file allocation information.
Second, and perhaps more important, a sector provides housekeeping data that
identifies the sector, the track, and error checking results from Cyclical Redundancy
Check (CRC) calculations. The location of each sector and housekeeping information
is set down during the format process. Once formatted, only the sector data and CRC
results are updated when a disk is written. Sector ID and synchronization data is never
re-written unless the disk is reformatted. This extra information means that each
sector actually holds more than 512 bytes, but you only have access to the 512 data
bytes in a sector during normal disk read/write operations. If sector ID data is
accidentally overwritten or corrupted, the user-data in the afflicted sector becomes
unreadable. The format process also writes a bit of other important information to the
disk. The boot record is the first sector on a disk (sector 0). It contains several key
parameters that describe the characteristics of the disk.
NetPro Certification Courseware for NetPro Certified Systems Engineer – N.C.S.E
In addition to the boot record, a File Allocation Table (FAT) is placed on track 0. The
FAT acts as a table of contents for the disk. As files are added and erased, the FAT is
updated to reflect the contents of each cluster. As you might imagine, a working FAT
is critical to the proper operation of a disk. If the FAT is accidentally overwritten or
corrupted, the entire disk can become useless. Without a viable FAT, the computer
has no other way to determine what files are available or where they are spread
throughout the disk. The very first byte in a FAT is the media descriptor byte, which
allows the drive to recognize the type of disk that is inserted.
The Disk
In the illustration above, you can see how the disk is divided into tracks and sectors.
If you have ever used an audiocassette, you know that it has one big disadvantage -- it
is a sequential device. The tape has a beginning and an end, and to move the tape to
another song later in the sequence of songs on the tape you have to use the fast
forward and rewind buttons to find the start of the song, since the tape heads are
stationary. For a long audio cassette, tape it can take a minute or two to rewind the
whole tape, making it hard to find a song in the middle of the tape.
A floppy disk, like a cassette tape, is made from a thin piece of plastic coated with a
magnetic material on both sides. However, it is shaped like a disk rather than a long
thin ribbon. The tracks are arranged in concentric rings so that the software can jump
from "file 1" to "file 19" without having to fast forward through files. The diskette
spins like a record and the heads move to the correct track, providing what is known
as direct access storage.
NetPro Certification Courseware for NetPro Certified Systems Engineer – N.C.S.E
The Drive
The major parts of a FDD include:
Read/Write Heads: Located on both sides of a diskette, they move together on the
same assembly. The heads are not directly opposite each other in an effort to prevent
interaction between write operations on each of the two media surfaces. The same
head is used for reading and writing, while a second, wider head is used for erasing a
track just prior to it being written. This allows the data to be written on a wider "clean
slate," without interfering with the analog data on an adjacent track.
Drive Motor: A very small spindle motor engages the metal hub at the center of the
diskette, spinning it at either 300 or 360 rotations per minute (RPM).
Stepper Motor: This motor makes a precise number of stepped revolutions to move
the read/write head assembly to the proper track position. The read/write head
assembly is fastened to the stepper motor shaft.
Mechanical Frame: A system of levers that opens the little protective window on the
diskette to allow the read/write heads to touch the dual-sided diskette media. An
external button allows the diskette to be ejected, at which point the spring-loaded
protective window on the diskette closes.
Circuit Board: Contains all of the electronics to handle the data read from or written
to the diskette. It also controls the stepper-motor control circuits used to move the
read/write heads to each track, as well as the movement of the read/write heads
toward the diskette surface.
The read/write heads do not touch the diskette media when the heads are traveling
between tracks. Electronic optics check for the presence of an opening in the lower
corner of a 3.5-inch diskette (or a notch in the side of a 5.25-inch diskette) to see if the
user wants to prevent data from being written on it.
Write-protect sensors are used to detect the position of a disk’s file-protect tab. For
3.5” disks, the write-protect notch must be closed to allow both read and write
operations. If the notch is open, the disk can only be read. A mechanical switch is
typically used to detect the write protect hole.
A track 0 sensor provides a logic signal when the heads are positioned over track 0.
Each time that a read or write is ordered; the head assembly is stepped to track 0.
Although a drive “remembers” how many steps should be needed to position the
heads precisely over track 0, an opt isolator or switch senses the head carriage
assembly position. At track 0, the head carriage should interrupt the opt isolator or
actuate the switch. If the drive supposedly steps to track 0 and there is no sensor
signal to confirm the position (or the signal occurs before the drive has finished
stepping), the drive assumes that a head positioning error has occurred. Head step
counts and sensor outputs virtually always agree unless the sensor has failed or the
drive has been physically damaged.
The index hole sensor in the floppy drive senses the passing index hole. Initial writing
of any track is done after the index hole is sensed. The beginning of any track is
immediately after the index hole on each revolution of the disc.
The electronics of a 3.5” drive must be able to differentiate whether the disk contains
normal (double) density or high-density media. A media hole sensor looks for the hole
that is found near the bottom of all high-density disk bodies. A mechanical switch is
typically used to detect the high-density hole, but a separate LED/detector pair might
also be used. When the hole is absent (a double-density disk), the switch is activated
upon disk insertion. If the hole is present (a high-density disk), the switch is not
actuated. All switch conditions are translated into logic signals used by the drive
electronics.
NetPro Certification Courseware for NetPro Certified Systems Engineer – N.C.S.E
Before the drive is allowed to operate at all, a disk must be inserted properly and
interlocked with the spindle. A disk-in-place sensor detects the presence or absence of
a disk. Like the write-protect sensor, disk sensors are often mechanical switches that
are activated by disk contact. If drive access is attempted without a disk in place, the
sensor causes the drive’s logic to induce a DOS “Disk not ready” error code.
PHYSICAL INTERFACE
The drive must receive control and data signals from the computer, and deliver status
and data signals back to the computer, as required. The series of connections between
a floppy-disk PC board and the floppy-disk controller circuit is known as the physical
interface.
The advantage to using a standard interface is that various drives made by different
manufacturers can be “mixed and matched” by computer designers. A floppy drive
working in one computer will operate properly in another computer, regardless of the
manufacturer as long as the same physical interface scheme is being used. Floppy
drives use a physical interface that includes two cables: a power cable and a signal
cable. Both cable pin outs are illustrated in Fig.3. The classic power connector is a 4-
pin “mate-n-lock” connector, although many low profile drives used in mobile
computers (e.g., laptops or notebooks) might use much smaller connector designs.
Floppy drives require two voltage levels: +5.0 Vdc for logic, and +12.0 Vdc for
motors. The return (ground) for each supply is also provided at the connector. The
signal connector is typically a 34-pin Insulation-Displacement Connector (IDC) cable.
Notice that all odd-numbered pins are ground lines, but the even-numbered pins carry
active signals. In a system with more than one floppy drive, the particular destination
drive must be selected before any read or write is attempted. A drive is selected using
the appropriate Drive select line (Drive select 0 to 3) on pins 10, 12, 14, and 6,
respectively. For notebook or sub-notebook systems where only one floppy drive is
used, only Drive Select 0 are used—the remaining select inputs might simply be
disconnected. The spindle motor servo
circuit is controlled through the Motor on signal (pin 16). When pin 16 is logic 0, the
spindle motor should spin up (approach a stable operating speed). The media must be
spinning at the proper rate before reading or writing can occur. To move the R/W
heads, the host computer must specify the number of steps that a head carriage
assembly must move, and the direction in which steps must occur. A Direction select
signal (pin 18) tells the coil driver circuit whether the heads should be moved inward
(toward the spindle) or outward (away from the spindle). The Step signal (pin 20)
provides the pulse sequence that actually steps the head motor in the desired direction.
The combination of Step and Direction select controls can position the R/W heads
over the disk very precisely. The Side select control pin (pin 32) determines whether
head 0 or head 1 is active for reading or writing—only one side of the disk can be
manipulated at a time. Two signals are needed to write data to a disk. The Write gate
signal (pin 24) is logic 0 when writing is to occur, and logic 1 when writing is
inhibited (or reading). After the Write gate is asserted, data can be written to the disk
over the Write data line (pin 22). When reading, the data that is extracted from the
disk is delivered from the Read data line (pin 30). Each of the drive’s sensor
NetPro Certification Courseware for NetPro Certified Systems Engineer – N.C.S.E
conditions are sent over the physical interface. The Track 00 signal (pin 26) is logic 0
whenever the head carriage assembly is positioned over track 00. The Write protect
line (pin 28) is logic 0 whenever the disk’s Write protect notch is in place.
Writing is inhibited whenever the Write protect signal is asserted. The Index signal
(pin 8) supplies a chain of pulses from the index sensor. Media type is indicated by
the Normal/high-density sensor (pin 2). The status of the disk-in-place sensor is
indicated over the Disk change ready line (pin 34).
NetPro Certification Courseware for NetPro Certified Systems Engineer – N.C.S.E
• Two floppy disks do not get corrupted if they are stored together, due to the
low level of magnetism in each one.
• In your PC, there is a twist in the FDD data-ribbon cable -- this twist tells the
computer whether the drive is an A-drive or a B-drive.
• If you wish to redisplay the data on a diskette drive after changing a diskette,
you can simply tap the F5 key (in most Windows applications).
• In the corner of every 3.5-inch diskette, there is a small slider. If you uncover
the hole by moving the slider, you have protected the data on the diskette from
being written over or erased.