Difference between revisions of "Compact Flash"

From 68kMLA Wiki
Jump to: navigation, search
(Created page with "__NOTOC__ {{media specs infobox| |form-factor=Compact Flash |alias=CF |image=SanDisk4GB NoSpeed CF.JPG |hd-std=16 MiB to 128 GiB |hd-type=IDE |os-mac=System 6 - Mac OS 9.2.2 }...")
(No difference)

Revision as of 15:38, 4 August 2014

Template:Media specs infobox


CompactFlash (CF) is a mass storage device format used in portable electronic devices. The format was first specified and produced by SanDisk in 1994. It is now used for a variety of devices; most contain flash memory but some, such as the Microdrive, contain a hard disk.

CompactFlash became the most successful of the early memory card formats, surpassing Miniature Card, SmartMedia, and PC Card Type I in popularity. Subsequent formats, such as MMC/SD, various Memory Stick formats, and xD-Picture Card offered stiff competition. Most of these cards are smaller than CompactFlash while offering comparable capacity and speed. Proprietary memory card formats for use in professional audio and video, such as P2 and SxS, are physically larger, faster, and more costly.

CompactFlash remains popular and is supported not only in many high end consumer devices, but in some professional applications as well. As of 2012, both Canon and Nikon use CompactFlash as storage medium for their flagship digital still cameras. Canon also chose CompactFlash as the recording medium for its professional high-definition tapeless video cameras. Ikegami professional video cameras can record digital video onto CompactFlash cards through an adaptor.

In 2008, a variant of CompactFlash known as CFast was announced. CFast is based on the Serial ATA bus rather than the Parallel ATA bus, used by the original CompactFlash.

In November 2010, Sandisk, Sony and Nikon proposed a next generation card format to the CompactFlash Association which would come in a similar form factor as CF/CFast but be based on PCI Express instead of Parallel ATA or SATA. The new format is targeted at high-definition camcorders and high-resolution digital photo cameras, would offer a target read and write speeds of 1 GiB/sec with storage capabilities beyond 2 TiB, and is not backward compatible with either CompactFlash or CFast. The XQD card format was officially announced by the CompactFlash Association in December 2011.


There are two main subdivisions of CF cards, Type I (3.3 mm thick) and the thicker Type II (CF2) cards (5 mm thick). The CF Type II slot is used by Microdrives and some other devices, such as the Hasselblad CFV Digital Back for the Hasselblad series of medium format cameras. There are four main speeds of cards including the original CF, CF High Speed (using CF+/CF2.0), a faster CF 3.0 standard and a yet faster CF 4.0 standard that is being adopted as of 2007. The thickness of the CF card type is dictated by the preceding PC Card standard.

CompactFlash was originally built around Intel's NOR-based flash memory, but has switched to NAND technology. CF is among the oldest and most successful formats, and has held a niche in the professional camera market especially well. It has benefited from both a better cost to memory-size ratio and, for much of the format's life, generally greater available capacity than other formats.

CF cards can be used directly in a PC Card slot with a plug adapter, used as an ATA (IDE) or PCMCIA storage device with a passive adapter or with a reader, or attached to other types of ports such as USB or FireWire. As some newer card types are smaller, they can be used directly in a CF card slot with an adapter. Formats that can be used this way include SD/MMC, Memory Stick Duo, xD-Picture Card in a Type I slot, and SmartMedia in a Type II slot, as of 2005. Some multi-card readers use CF for I/O as well.


The CompactFlash interface is a 50-pin subset of the 68-pin PCMCIA connector. "It can be easily slipped into a passive 68-pin PCMCIA Type II to CF Type I adapter that fully meets PCMCIA electrical and mechanical interface specifications", according to compactflash.org. The interface operates as either a 16-bit PC Card or as an IDE (PATA) interface.

CompactFlash IDE mode defines an interface that is smaller than, but electrically identical to, the ATA interface. The CF device contains an ATA controller and appears to the host device as if it were a hard disk in most cases when connected the the system's IDE (PATA) Bus. CF devices operate at 3.3 volts or 5 volts, and can be swapped from system to system. CF cards with flash memory are able to cope with extremely rapid changes in temperature. Industrial versions of flash memory cards can operate at a range of −45° to +85°C.

The IBM Microdrive format implements the CF Type II interface, but is not solid-state memory. Hitachi and Seagate also make microdrives.


CompactFlash IDE (ATA) emulation speed is usually specified in "x" ratings, e.g. 8x, 20x, 133x. This is the same system used for CD-ROMs and indicates the maximum transfer rate in the form of a multiplier based on the original audio CD data transfer rate, which is 150 kByte/s. Comparerd to a hard drive with 15MiB/sec dta transfers, devide the "x" by 10 to get a aproximate idea as to its speed. Thus a CF with an x-rating of 75 is aproximately slower, an x-rating of 100 is aproximately equal, and an x-rating of 133 is aproximately faster than a hard drive without other factors applied.

These are manufacturer speed ratings. Actual transfer speed may be higher, or lower, than shown on the card depending on several factors. The speed rating quoted is almost always the read speed, while write speed is often slower.

Solid state

For reads, the onboard controller first powers up the memory chips from standby. Reads are usually in parallel, error correction is done on the data, then transferred through the interface 16 bits at a time. Error checking is required due to soft read errors. Writes require powerup from standby, wear leveling calculation, a block erase of the area to be written to, ECC calculation, write itself (an individual memory cell read takes around 100 ns, a write to the chip takes 1ms+ or 10,000 times longer).

Because the USB 2.0 interface is limited to 60 MByte/s and lacks bus mastering hardware, USB 2.0 implementation results in slower access. Modern UDMA-7 CompactFlash Cards provide data rates up to 145 Mbytes/sec and require USB 3.0 data transfer rates.

A direct motherboard connection through a CF to IDE Adapter is often limited to 33 MByte/s because IDE to CF adapters lack high speed ATA (66 MByte/s plus) cable support. Connection to the motherboard through a cabeless DOM (Device on Motherboard) CF to IDE adapter can support high speed ATA if it has DMA Support. Another limiting factor is the lack of DMA on some CF to IDE adapters which can be added by soldering 2 wires on the adapter. Power on from sleep/off takes longer than power up from standby.

SanDisk announced its 16 GB Extreme III card at the Photokina trade fair, in September, 2006. That same month, Samsung announced 16, 32 and 64 GB CF cards. Two years later, in September, 2008, PRETEC announced 100GB cards.

Use in place of a hard disk drive

In early 2008 the CFA demonstrated CompactFlash cards with a built in SATA interface. Several companies make adapters to allow CF cards to be connected to PCI, PCMCIA, IDE, 44-pin laptop mini-IDE, and SATA connections, allowing a CF card to act as a solid-state drive with virtually any operating system or BIOS, and even in a RAID configuration.

CF cards may perform the function of the master or slave drive on the IDE bus. Late-model cards that provide DMA (using UDMA or MWDMA) will opperate at a slower speed when used through a passive adapter that does not support DMA. Addonics is one of the few CF adapter manufacturer who make an active interface with DMA support. Most passive interfaces go for a few dollars and as low as $1 through ebay, while active interfaces will go for $20 or more.

Windows XP reads most CFs as "Removable Media", even if it is placed into the system's IDE (PATA) Primary Channel. Other systems like Windows 95 to 2000, Vista, 7 and 8 recognizes CFs as a hard dirve when connected to the IDE Bus, and as Removable media when conneced through USB. This is because of the CF Media Identification Tag that registers is as either a solid state device or Compact Flash Media. Windows XP can be tricked into thinking that a compact flash card is a hard drive by either use of a Linux Loader like Grub or to use a Windows/DOS program called "ATCFWCHG.COM" by SanDisk. SanDisk no longer supports "ATCFWCHG.COM" and has since taken it down from its website but you can find it through a google.com search.


Original PC Card memory cards used an internal battery to maintain data when power was removed; the rated life of the battery was the only reliability issue. CompactFlash cards that use flash memory, like other flash-memory devices, are rated for a limited number of erase/write cycles for any "block." Cards using NOR flash had a write endurance of 10,000 cycles. Current cards using NAND flash are rated for 1,000,000 writes per block before hard failure. This is less reliable than magnetic media but aproximates to about 5 years of use, the same as a hard drive. Car PC Hacks suggests disabling the Windows swap file (Virtual Memory) and using its Enhanced Write Filter (EWF) to eliminate unnecessary writes to flash memory. Under Macintosh OSX, it is best to turn off UNIX's logging system to minimize the numbr of writes OSX does to the CF Media. On other OS like Windows 95 to 2000 and Mac OS 6 to 9.2.2, which does does not write logs to the media, to turn off Virtual Memory. Under Linux, it i best used without a SWAP Partition. Additionally, when formatting a flash-memory drive, the Quick Format method should be used, to write as little as possible to the device.

Most CompactFlash flash-memory devices limit wear on blocks by varying the physical location to which a block is written. This process is called wear leveling. When using CompactFlash in ATA mode to take the place of the hard disk drive, wear leveling becomes critical because low-numbered blocks contain tables whose contents change frequently. Current CompactFlash cards spread the wear-leveling across the entire drive. The more advanced CompactFlash cards will move data that rarely changes to ensure all blocks wear evenly.

NAND flash memory is prone to frequent soft read errors. The CompactFlash card includes error checking and correcting (ECC) that detects the error and re-reads the block. The process is transparent to the user, although it may slow data access.

As flash memory devices are solid-state, they are more shock-proof than rotating disks.

The possibility for electrical damage from upside-down insertion is prevented by asymmetrical side slots, assuming that the host device uses a suitable connector.

Small cards consume around 5% of the power required by small disk drives and still have reasonable transfer rates of over 45 MByte/s for the more expensive 'high-speed' cards. However, the manufacturer's warning on the flash memory used for ReadyBoost indicates a current draw in excess of 500 mA.

File systems

CompactFlash cards for use in consumer devices are typically formatted as FAT12 (for media up to 16 MB), FAT16 (for media up to 2 GB, sometimes up to 4 GB) and FAT32 (for media larger than 2 GB). Under Macintosh OS HSF can support 4Gib and HFS+ can support up to 16TiB. This lets the devices be read by personal computers but also suits the limited processing ability of some consumer devices such as cameras.

The cards themselves can of course be formatted with any type of file system such as Ext, JFS and NTFS. It can be divided into partitions as long as the host device can read them. CompactFlash cards are often used instead of hard drives in embedded systems, dumb terminals and various small form-factor PCs that are built for low noise output or power consumption. CompactFlash cards are often more readily available and smaller than purpose-built solid-state drives and often have faster seek times than hard drives.

Type I and Type II

The only physical difference between the two types is that Type I devices are 3.3 mm thick while Type II devices are 5 mm thick. Electrically, the two interfaces are the same except that Type I devices are permitted to draw up to 70 mA supply current from the interface, while type II devices may draw up to 500 mA.

Most Type II devices are Microdrives, other miniature hard drives, and adapters, such as a popular adapter that takes Secure Digital cards. A few flash-based Type II devices were manufactured, but Type I cards are now available in capacities that exceed Microdrives. Manufacturers of CompactFlash cards such as Sandisk, Toshiba, Alcotek and Hynix offer devices with Type I slots only. Some of the latest DSLR cameras, like the Nikon D800, have also dropped Type II support.

Battery Life on Laptops

Since Compact flash draws less current than a hard drive, battery life per charge is longer. In some cases it can double the length of time per charge on the battery. In some rare cases, a shorted out battery has been brought back to some usefullness when using a CF, because the hard drive draws too much current than the shorted out battery can handle.

Powersupply Stress on Laptops and Desktops

Since Compact flash draws less current than a hard drive, stress on the system's power supply is a lot less, making it last longer under normal conidtions and usage.

Full Specifications

Template:Media specs full

More Information