I've mentioned using Microchip PICs or Arduino Leonardo to work as USB clients. The truth is, though, that for many designs, it is just as easy to let the USB port pretend to be a serial port and then use the serial port drivers for your operating system to talk to the device.
What would be really interesting, though, is an easy way to act as a USB host. Using a USB drive for data logging storage is an obvious application. A USB keyboard or mouse might form a user interface or — with modifications — act as a sensor (I can imagine a CNC table with an optical mouse sensing position, for example).
If you want an all-in-one solution for doing USB to serial, you've probably found FTDI's offerings. They have a series of easy-to-use ICs and modules that look like a serial port to your design and a USB device to the host computer. It isn't surprising, then, that they also offer a solution for USB host duties. That solution is known as Vinculum.
You can get Vinculum as an IC or bundled in a module. There are several modules, but I picked up the VDrive3. It is an attractive little plastic enclosure with a USB jack on the face and some wires coming out the back. You should be able to connect a USB device to the front and your microcontroller to the back and be in business.
My experience so far has not been very good. In all fairness, maybe I've missed some key documentation, but I don't think I have. The hardware by itself does nothing. However, it is preloaded with one particular FTDI-provided firmware. You can load different firmware if you prefer. That leads to the first problem. To get to the documentation that you really want, you have to find the firmware documentation, not the hardware documentation.
When you find the firmware documentation, it appears to be for an older device (VDAP), but there is an application note that explains the differences between the old firmware and the new (V2DAP). There are some application notes that show the device being used but no real reference or tutorial type documentation. The User's Manual is the best thing I can find, even though it is out of date. It also discusses the different firmware available (and, of course, you are free to write your own from scratch if you want).
However, the manual has been only part of the problem. The device seems to think you will connect to it with an ASCII terminal and type commands to it. It has verbose messages and commands. However, you can shift to a short command mode and even a binary numeric mode. Although the chip starts in long command mode, it also starts in binary numeric mode. So while you can read the messages, the numbers come out as garbage.
For my purposes, I really wanted to be in an efficient machine-friendly format. That takes a few commands (and parsing of the prompt). It isn't impossible, of course, but it is strange for something clearly meant to interface to an embedded system. It reminded me of talking to a modem that was never quite sure you were not personally typing commands to it.
In addition, I found the USB connection unreliable. Again, this could be my fault, but some USB sticks would not read reliably even though they work fine on a Linux or Windows machine. If I were integrating this into a real product, that would be unacceptable.
I wanted to like the Vinculum. I really did. If it worked reliably, the software would be just painful and not a showstopper. The documentation — or, at least, what I found of it — was abysmal. It is a real shame. I've been so impressed with many of FTDI's other offerings that I expected better from Vinculum.
I was going to post some code, but with the problems the device has exhibited, I'll wait a bit and see if I can make it work any better. Meanwhile, if you've used the device yourself, leave a comment and share your experience, good or bad.