12
Mass Data Management for Embedded Systems: Compact Flash Eric Ng, MSME EE281: ESDL December 4, 2002

Mass Data Management for Embedded Systems: Compact Flash Eric Ng, MSME EE281: ESDL December 4, 2002

Embed Size (px)

Citation preview

Page 1: Mass Data Management for Embedded Systems: Compact Flash Eric Ng, MSME EE281: ESDL December 4, 2002

Mass Data Management for Embedded Systems: Compact Flash

Eric Ng, MSME

EE281: ESDL

December 4, 2002

Page 2: 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

Page 3: Mass Data Management for Embedded Systems: Compact Flash Eric Ng, MSME EE281: ESDL December 4, 2002

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

Page 4: Mass Data Management for Embedded Systems: Compact Flash Eric Ng, MSME EE281: ESDL December 4, 2002

Other Mass Storage Options Sony Memory Stick IBM Microdrive MultiMedia Card (MMC) or Secure

Digital Card (SD) SmartMedia Card (SMC)

Page 5: Mass Data Management for Embedded Systems: Compact Flash Eric Ng, MSME EE281: ESDL December 4, 2002

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 >>

Page 6: Mass Data Management for Embedded Systems: Compact Flash Eric Ng, MSME EE281: ESDL December 4, 2002

Step 1: IDE to CF Adapter

http://www.acscontrol.com $19.99

Page 7: Mass Data Management for Embedded Systems: Compact Flash Eric Ng, MSME EE281: ESDL December 4, 2002

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)

Page 8: Mass Data Management for Embedded Systems: Compact Flash Eric Ng, MSME EE281: ESDL December 4, 2002

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

Page 9: Mass Data Management for Embedded Systems: Compact Flash Eric Ng, MSME EE281: ESDL December 4, 2002

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

Page 10: Mass Data Management for Embedded Systems: Compact Flash Eric Ng, MSME EE281: ESDL December 4, 2002

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)

Page 11: Mass Data Management for Embedded Systems: Compact Flash Eric Ng, MSME EE281: ESDL December 4, 2002

Resources CompactFlash Association

http://www.compactflash.org Microsoft

File Allocation Table (FAT) White Paper IDE to CF Adapter

http://www.acscontrol.com

Page 12: Mass Data Management for Embedded Systems: Compact Flash Eric Ng, MSME EE281: ESDL December 4, 2002

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