USB host-mode on uC, to support small pre-defined set of USB devices

Apparently, one of the main reasons why most 8-bit/16-bit uC's do not support USB host-mode operation is because of the rather expensive process called "enumeration". From my research, this step seems to be necessary when the host must identify the class of device connected to it, identify specific vendor/device and then load the appropriate driver to handle communication between host processor and device. The other reason being need to provide sufficient current to the devices.

Now if the "sufficient current" is not a big issue, let's say because my uC (which I'd like to act as USB host) is powered (via a well rated, regulated wallwart), and there are only 3 USB devices with which it needs to work, for instance --

1. Device that uses proprietary Serial over USB
2. Device (sensor) that uses USB-HID
3. Specific vendor/model USB2.0 Bluetooth2.1 device

via say a USB hub device ? In fact, if it can be a powered hub, then the question of "sufficient current" is anyway addressed by it.

Is it possible to make do with say something like Atmel ATmega32U2 ? The idea being, instead of enumerating devices from a large list of possible devices, I know in advance which devices are connected, and how they are connected ? What might be the caveats if this were to be possible ? If someone is aware of such attempts (successful or not), would love to hear about them.

• There are enough ways available to provide host mode with a microcontroller that trying to do it with something not intended for the role is "doing it the hard way". Look for devices with USB OTG" = "On the Go" capability. These can provide either host of slave capability as required. Jan 30, 2012 at 9:40
• Well, then, add: "4. USB Hub" because that's another device driver you'll need. And, talking to a Bluetooth device is bound to be yet another project. Mar 24, 2015 at 6:03

There are enough ways available to provide host mode with a microcontroller that trying to do it with something not intended for the role is "doing it the hard way".

Look for devices with USB OTG" = "On the Go" capability.
These can provide either host of slave capability as required.

If "... something like Atmel ATmega32U2 ... " includes an Atmel AT90USB64 , then yes.

ie using one of the available parts that DO have this capability is the "easy way" to go. There are enough ways available to provide host mode with a microcontroller that trying to do it with something not intended for the role is "doing it the hard way". Look for devices with USB OTG" = "On the Go" capability. These can provide either host of slave capability as required.

ICs with OTG capability of some sort

Cheapest in 1's in stock at Digikey:

AVR microcontroller with USB OTG capability $8.43/1 Digikey in stock. PIC OTG & Host capable microcontroller$4.22/1 in stock Digikey

The PIC device is also the cheapest host / OTG microcontroller of any sort available in stock in 1's from Digikey.

• Can you teach some of what OTG is also, instead of just a bank of places to buy things? Jan 30, 2012 at 10:18
• Thanks @Russell. Those are some good options. I was not aware that USB-OTG or USB-Host options are available on 8-bit uC's. I wish the AVR's were available in low pin-count and in the same price-range as the PICs. The PIC's as such seem to be very close to what I need, but wanted to see if V-USB like SW bitbanged solution would be possible. Probably not. Jan 30, 2012 at 12:54
• Reading thru the PIC documentation around OTG, I realized that the OTG implementation (or standard, not sure), isn't a full "host" implementation, i.e. there are some limitations/caveats. While it might still very-well fulfill my needs, but wanted to highlight this fact. Jan 31, 2012 at 5:56
• @icarus74: Would you care to share examples of such "limitations/caveats"? Jun 9, 2013 at 22:44
• @pfalcon, don't quite remember what they were (been a while), but I recollect that the data-sheet itself listed the limitations, so that'd be a good place to look. Jun 10, 2013 at 6:32

There is some SW based implementation of USB Host controller on Atmega uControllers

SIAM32 USB HC (Software Implemented Atmel Mega32 Universal Serial Bus Host Controller ) https://courses.cit.cornell.edu/ee476/FinalProjects/s2007/blh36_cdl28_dct23/blh36_cdl28_dct23/