Upload
christal-white
View
212
Download
0
Embed Size (px)
Citation preview
Mass Data Management for Embedded Systems: Compact Flash
Eric Ng, MSME
EE281: ESDL
December 4, 2002
Presentation Overview Reasons for using Compact Flash Other Mass Storage Options Step-by-Step Guide to using CF FAT (File Allocation Table) Overview
Reasons for Using Compact Flash
Portable+Low Power: Data management has become crucial in today’s embedded systems. Data loggers, MP3 Players, Digital Cameras, PDAs
No Mechanical Parts: withstands higher shock impacts compared to HDDs.~1000Gs vs ~200Gs (Operating Condition)
Relatively Inexpensive: 512MB ~ $120 Fast: avg seek time: 10ms;10x faster than floppy Nonvolatile Memory: 10 yr retention
Other Mass Storage Options Sony Memory Stick IBM Microdrive MultiMedia Card (MMC) or Secure
Digital Card (SD) SmartMedia Card (SMC)
Introduction to UsingCompact Flash Lots of literature, but straight forward.
Compact Flash has HDD interface. PC AT Attachment (ATA)
Its compact nature may be difficult to interface without adapter. IDE to Compact Flash Adapter
Step-by-Step Guide >>
Step 1: IDE to CF Adapter
http://www.acscontrol.com $19.99
Step 2: controller Interface CF has 50 pin outs, but requires only
following connections Data Port (8-bit or 16-bit) Address Lines (5) Read/Write Lines (2)
Step 3: Accessing the Registers
CE2 CE1 A2 A1 A0 IORD=0 IOWR=01 0 0 0 0 RD Data WR Data1 0 0 0 1 Error Register Features1 0 0 1 0 Sector Count Sector Count1 0 0 1 1 Sector Num. Sector Num.1 0 1 0 0 Cylinder Low Cylinder Low1 0 1 0 1 Cylinder High Cylinder High1 0 1 1 0 Select Card/Head Select Card/Head1 0 1 1 1 Status Command0 1 1 1 0 Alt Status Device Ctrl.0 1 1 1 1 Drive Addr. Reserved
Example: Reading Data Initialization Sequence:
(1) Set Features to Enable 8-bit transfers (2) Enable Logical Block Addressing (LBA)
Identify sector by writing to LBA registers
Call command: Read Sectors Retrieve data from Data Register
Summary Compact Flash is EASY to use!
(1) Get adapter (2) Interface with u-controller (3) Learn to use the registers
File Organization in the CF File Allocation Table (FAT)
Resources CompactFlash Association
http://www.compactflash.org Microsoft
File Allocation Table (FAT) White Paper IDE to CF Adapter
http://www.acscontrol.com
Memory Comparison
Compact Flash SmartMedia Card MultiMedia Card IBM MicroDrive1.43" x 1.68" x .13" 01.77" x 1.45" x .003" 0.94" x 1.26" x .06" 1.43" x 1.68" x .13"Up to 1024MB Up to 128MB 1000 / 512 / 340300,000 cycles 1,000,000 cycles10 years 10 years >1,000,000 hours1000 Gs 1000 Gs 1000 Gs 175 Gs11 ms 11 ms 12 ms100 uA 33mA max 20 mA60 mA 35 mA 60 mA 250 mA512MB @ $120 128 MB @ $50 256 MB @ $120 1 GB @ $300