ATmega8U2 as host USB controller ?

Hello, I desire to build a custom board based on the ATmega8U2 which will function as a USB host. This board will connect to a existing Xilinx board with a Silicon Image CP2103 USB to UART Bridge chip on it. (My assumption is that the CP2103 is only capable of being a slave port.)

Ultimately I'd like to be able to send data from the Xilinx board to the ATmega8U2, so the data flow would look like this:

Xilinx FPGA serial link -> CP2103 (convert to USB) -> ATmega8U2 (built-in USB port)

Not knowing nearly enough about USB, I'm pretty confused at this point as to whether this is a very simple task, entirely impossible, or something in-between.

For starters, it's not clear to me whether the ATmega8U2's built-in USB port has the ability to function as a host.

I see the examples about connecting to a mouse or a keyboard (either of which must be a slave device); can I simply leverage one of those examples and start receiving data from the CP2103? (Hardware is on order and should be here in a couple days, so I haven't been able to try this yet.)

Here's a snapshot of how I've designed the custom board:

I'm clearly in need of some very basic help here. Thank you in advance!
Bryan

A common USB Host chip is the MAX3421E.
http://datasheets.maximintegrated.com/en/ds/MAX3421E.pdf

Your usage description sounds more like HID (human interface device, I think), search on that in the forum. Code exists to program the 16U2 and 32U4, I don't know if 8U2 has enough SRAM/flash to support HID or not.

CrossRoads:
Your usage description sounds more like HID (human interface device, I think), search on that in the forum. Code exists to program the 16U2 and 32U4, I don't know if 8U2 has enough SRAM/flash to support HID or not.

Thanks. Your statement about my usage being like HID doesn't quite make sense to me -- I think of HID as things like keyboards, mice, pointers, etc. (I may have confused the situation by throwing out the "keyboard" example; sorry for that.)

What I'm trying to do actually has nothing to do with interfacing to a human; rather, what I'm looking to do is probably closer to setting up a host / terminal emulator that accepts a data stream from the USB slave (and then acts upon it.) The basis of our application is that an FPGA is sending data to the CP2103 which then makes that same data available on the USB bus. Today, a terminal emulator is connected to the USB port and displays that data. I'm trying to receive that same stream of data via some custom hardware that includes a microcontroller.

At this point, I'm more than willing to design a new board with the MAX3421E that you suggest. Assuming I also throw a general purpose ATmega* device on the board, does code exist to enable / configure the Maxim chip to be host and then start receiving data from the slave? I'd love to start with something that's known to work; cost / board space not an issue.

Sparkfun has a host shield using this chip. I believe it has code to go with it. I'd start there.

Thanks

CrossRoads:
Sparkfun has a host shield using this chip. I believe it has code to go with it. I'd start there.

Thanks -- good suggestion. I've ordered their USB Host shield and should have it tomorrow. (I'll plan to just get this functionality working with an Uno and this shield and then worry about turning another version of a custom board.)

Two questions (one old and one new) for anyone else reading this thread:

  1. Can someone confirm that the ATmega8u2 can or cannot function as a host?

  2. There seem to be two versions of Arduino software out there for this USB Host shield ("USB Host Shield Library 2.0" & "UHS30-master"), each with numerous example programs that seem to target various specific pieces of USB hardware. Can someone point me to something generic that would accomplish the following?
    a) Initialize the USB Host shield
    b) Establish a connection with the slave device
    c) Poll the slave and present the data returned

I'm still an Arduino newbie and every example I open up seems to be incredibly complicated.

In addition, I had no idea that USB was this challenging. As a consumer, it just seems so easy. As a wanna-be developer... oy!