Hi Guys, You don't need to go to the trouble if interfacing as a USB master to read CF cards.. You can interface a PIC to them directly reasonably simply. I've done this for a MP3 player for a client of mine. The CF card has a (slower) 8-Bit interface as do Hard drives.. But speed shouldn't be too much of a problem. To make it faster you would have to use a PLD to implement a "proper" IDE like interface. 3M and many others make CF card connectors, I'm sure you should be able to get them from digikey. You can also interface a PIC to a IDE hard drive (web pages out there on doing this).. I used a '877 for my MP3 player.. Shouldn't be too hard to design a storage unit.. I don't think you would need any extra RAM for buffering as HDs and CFs generally both use 512 byte blocks so you read the block out of the CF and straight into the HD.. I haven't looked to hard at it but I'm sure you could do a minimal implementation with very little extra glue logic. Just looking at the schematic for my MP3 player, ok for the CF card, you need an 8bit data bus, 3 address lines, Output Enable (Read), Write Enable (Write), Card Detect, Reset (optional), Ready/Busy (optional, but recommended). That's 16 connections. You would also want a Chip Enable if your sharing with a IDE HD.. Say 17. Then to interface to a HD (from memory here.. could be wrong) you have basically the same connections and almost the same registers that you talk to. You would need a different chip enable for the IDE disk.. I'm sure you could get away with around 20 pins at most. A '877 would then still have enough pins for a LCD and some buttons if you were tricky about the connections.. Reading and writing the raw data blocks (LBA mode) is pretty simple.. you set up some values in certain registers using the address pins to select the register and data and the OE and WE pins to read and write. Basically you query the registers to get disk format information (num sectors, size etc..) then you setup an address register and start reading or writing to a different register to stream the block of data in or out.. Once you can read and write the basic blocks, you need to implement some file system decoding.. this can get a little tricker because there are several different FAT file systems to accommodate, but not to hard.. Trouble is that a Hard Drive is going to eat batteries.. probably best to make it externally powered by a plug pack or car cigarette lighter socket.. Have the PIC spin up the HD when it detects a CF card inserted, it then works out the file system on the CF card and HD, displays some details on the LCD and waits for the "copy" button to be pressed to begin copy or the "erase" button to be pressed to erase the CF card perhaps.. I'd have it create a directory on the HD for each "date" (would need a Real time clock chip to help with this) then each CF card of pics entered on that day would get its own sub directory and you copy all the files into there. Then erase them on the CF card. You want to have at least 2 levels of directories because some FAT file systems have limited number of entires per directory and you could conceivably run out of directory entires. Cheers, Ash. --- Ashley Roll Digital Nemesis Pty Ltd www.digitalnemesis.com Mobile: +61 (0)417 705 718 > -----Original Message----- > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Brent Brown > Sent: Saturday, 15 June 2002 12:24 PM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [OT]: digital camera picture storage > > Back to project ideas though: USB card readers for PC's are cheap and > work well. That gives you a good connector for the card. Then you > need a USB master controler. Not many ideas there sorry. IDE > interfaces for micro's have been done before though. > > Another idea I can visualize is a 3.5" floppy drive sitting on top of > a 3.5" hard drive. Buy a memory card floppy drive adaptor and bang, > all your hardware is done for you. With this scheme the floppy drive > and hard drive interfaces are very similar and may be able to share > circuitry and software in your micro interface. Just detect the > floppy inserted and dump all contents into a new folder on the hard > drive and turn an LED on to say it's done. Maybe put the hard drive > in a removable bay to make it easy to get the data back into your PC. > > Sounds easy, but I know there will be a heap of work involved. > Probably more software than anything else. -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body