Implementing USB Host to read USB pen drive

Mar 15, 2007 9 Replies

I need to develop a new module that is able to read an USB pen drive mounted with FAT file-system. The goal of this module is to transfer a file resident on the key to a CPU memory area (this CPU can't be changed and is going to be interfaced with some kind of bus).



I 've never done something like this, so I'll be very pleased if you could give me some advice about this task.



Thanks


Its hard to say with any precision without knowing something about your system (processor and USB host controller type.) Generally speaking a USB host software stack is quite complex and requires quite a few resources.

Wrt FAT over USB mass-storage, a minimal stack looks like this:

FAT filesystem SCSI USB Transparent Transport USB Bulk USB Control USB Root Hub USB Host Controller Driver

In my experience, most "requirements" for USB host software in an embedded environment come from a more general requirement for a filesystem/mass-storage.

If this is your requirement and you have no need for the other features of USB, consider other mass-storage alternatives which are *considerably* less complex. For example Compact Flash, which has a stack that looks more like this:

FAT filesystem IDE driver

Michael N. Moran (h) 770 516 7918 5009 Old Field Ct. (c) 678 521 5460 Kennesaw, GA, USA 30144 http://mnmoran.org "So often times it happens, that we live our lives in chains and we never even know we have the key." The Eagles, "Already Gone" The Beatles were wrong: 1 & 1 & 1 is 1

This chip will do it all for you:

formatting link

Have a look at

formatting link
.

Michael N. Moran was thinking very hard :

I know, but I have to do it with sn USB pen drive. I've found some Fukitsu micro that are shipped with a companion library that handles most of the stack levels. The only layer I have to devel is the FAT Filesystem: someone suggest to use emFile by Segger, but it's too expensive. I think that I'm going to examine an opensource solution that I've seen some time ago.

As I've said before, I have to provide an USB solution. I've heavly used devices like SD and compact flash in previous application.

Thanks

David Brown pretended :

Nice micro, very nice micro. I have to check Vinculum sales network in Italy as I don't want to have any surprise at production time.

Thanks

Maxim just sent out a flyer about the MAX3421E chip, which does host-side USB. They provide a host stack with mass storage support for ARM7 chips. No idea how good it is, or whether it's actually available though. Combined with larwe's VFAT library, you should be up and going.

Clifford Heath.

"djordj" skrev i meddelandet news: snipped-for-privacy@despammed.com...

You could do this with an AT90USB1287 which has an AVR and a USB host controller and you can talk to your main CPU using SPI.

Best Regards, Ulf Samuelsson This is intended to be my personal opinion which may, or may not be shared by my employer Atmel Nordic AB

I haven't used the Vinculum myself, but it's made by FTDI

formatting link
), and I've bought lots of USB devices (basically various types of USB to UART converters) from them. If you are having trouble getting the parts in Italy, FTDI should not have a problem shipping them directly from Scotland.

formatting link
is your local dealer.

I have them also:

formatting link

Don...

Don McKenzie E-Mail Contact Page: http://www.dontronics.com/e-mail.html Crystal clear, super bright OLED LCD (128x128) for your microcontroller. Simple serial RX/TX interface. Many memory sizes. http://www.dontronics-shop.com/product.php?productid=16460 No More Damn Spam: http://www.wizard-of-oz.com

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required