Go Down

Topic: Can the Atmega32U4 be a USB host? (Read 2523 times) previous topic - next topic

funkyguy4000

Hello,

I'm working on an android/arduino project.  Since android USB host isn't supported before Android version 3.1, I need the arduino to act as a USB host. 
I know that there is a USB host shield, although I don't understand how it functions and frankly has too many components for me to break it down and put it on my project. 

So is there some way that the Atmega32U4 can be used as a host? I mean it already has onboard USB support, I don't think it would be too much of a stretch to make it work.
Accelerate to 88 miles per hour.

Tom Carpenter

The 32U4 doesn't have host capability. You would need either a chip that does, or a seperate USB host IC.
~Tom~

cyclegadget


You need to use bluetooth.
http://www.amarino-toolkit.net/index.php/plug-in.html

http://www.instructables.com/id/Use-your-android-phone-sensors-on-the-arduino-/

Good links: Eagle tutorial= http://www.youtube.com/playlist?list=PLDE1858BD83D19C70
General Arduion tutorials = http://tronixstuff.wordpress.com
http://www.gammon.com.au/forum/bbshowpost.php?bbtopic_id=123

funkyguy4000


The 32U4 doesn't have host capability. You would need either a chip that does, or a seperate USB host IC.


Do you have any IC's that you would recommend? Ones that could be easily used with the 32U4?


You need to use bluetooth.


As much as I would love to, I need to use the power to also power my project, so I might as well just have the data sent through the usb as well.  And as I understand it, bluetooth dealios are usually larger than a usb host chip
Accelerate to 88 miles per hour.

cyclegadget


This maybe of no help but, maybe can figure out what they are doing on this board. http://arduino.cc/en/Main/ArduinoBoardADK
Good links: Eagle tutorial= http://www.youtube.com/playlist?list=PLDE1858BD83D19C70
General Arduion tutorials = http://tronixstuff.wordpress.com
http://www.gammon.com.au/forum/bbshowpost.php?bbtopic_id=123

funkyguy4000

I've checked that out, It includes the MAX3421E. I could reverse engineer it I guess to see how it interfaces with the mega2560 although I still wouldn't have the code.  I'm sure I could find some, although the MAX3421E seems to need a good amount of external components such as a crystal and I simply don't have the board space for it. 
Accelerate to 88 miles per hour.

James C4S


although the MAX3421E seems to need a good amount of external components such as a crystal

I would call a crystal and a couple of caps a pretty minimal implementation for a Host controller.  Some of the other components are for if you need the Host to provide power to the device.   Depending on what you need to do in your application, I doubt you'll find a more minimal setup.

Keep in mind that USB isn't a simple protocol.  Depending on what you plan to connect to the USB-Host, you'll have to write your own drivers and can be a tall order.  The Uno / Leonardo's relatively small amount RAM is another challenge.  (The Mega's 8K is a little easier.)
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

westfw

Quote
it already has onboard USB support, I don't think it would be too much of a stretch to make it work.

USB host processing and USB device processing are MUCH different.  You're not going to see anything significantly simpler than the MAX3421 circuitry (significantly expensive chip + crystal + etc.)

funkyguy4000

Holy crap that chip is expensive!
Looks like i'll have to get 100 of them to get a decent price break.
Accelerate to 88 miles per hour.

funkyguy4000

Is there a library for the MAX3421E?
Looking at the datasheet, I don't understand it.
Accelerate to 88 miles per hour.

James C4S

Google:  max3421e arduino library
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

funkyguy4000

Oh wow, I thought I did. Haha guess not.

Thanks!
Accelerate to 88 miles per hour.

Go Up