Modified Frequency Modulation

From Wikipedia, the free encyclopedia

This article is about modified frequency modulation. For other uses of MFM, see the disambiguation page.

Modified Frequency Modulation, commonly MFM, is a line code used by most floppy disk formats, notably by most CP/M machines, as well as PCs running DOS.

MFM is a modification to the original FM (frequency modulation) scheme for encoding data on single-density floppy disks. Because the minimum spacing between flux transitions is a property of the disk and head design, MFM which guarantees at most one flux transition per data bit can be written at higher density than FM, which can require two transitions per data bit. It is used with a data rate of 250-500 kbit/s (500-1000 kbit/s encoded) on industry standard 5¼" and 3½" ordinary and high density diskettes. MFM was also used in early hard disk designs, before the advent of more efficient types of Run Length Limited (RLL) coding. Now, at the turn of the millennium, except for the steadily disappearing 1.44 MB floppy disk drives, MFM encoding is largely obsolete.

[edit] Coding

Data MFM
1 01 (or NP)
0 10 (or PN) if following a data 0
0 00 (or NN) if following a data 1

Notice no.1:

P - is a pulse (change the level of signal)

N - not a pulse (no change the level of signal)


Notice no.2 that two "ones" can't appear together, and the maximum number of zeros in a row is three. Thus, MFM is a (1,3) RLL code. This bit stream is then NRZI encoded to be written to disk, a 1 bit representing a magnetic transition, and a 0 bit no transition.

A special "sync mark" that violates the MFM encoding rules but maintains the (1,3) RLL property is used to identify headers. This is referred to as a "sync A1" because it decodes as hexadecimal A1, although it cannot appear in normal data.

[edit] Example

No.1

 1  0  1  0  0  0  0  1
NP NN NP NN PN PN PN NP (MFM encoding)

No.2

 1  0  1  0  0  0  0  1 ($A1 - Data)
01 00 01 00 10 10 10 01 ($44A9 - MFM encoding)
01 00 01 00 10 00 10 01 ($4489 - sync mark)
               ^ missing clock

[edit] See also


This article was originally based on material from the Free On-line Dictionary of Computing, which is licensed under the GFDL.

In other languages