Page 1 of 1

Full Speed possible?

Posted: Thu Oct 25, 2007 6:01 am
by Guest
Well I have a USB device that communicates with a host using interrupt transfers over a full-speed usb connection. I would like to create a software-bridge in between the 2, so basically communication would go like this:

host -> avr-usb
avr-usb -> device
device -> avr-usb
avr-usb -> host

I guess this is similar to a hid device like a mouse.

So I'm wondering if it would be possible to run (possibly with modifications) AVR-USB on a faster chip to achieve this? Is there a fast enough chip? I'm not too worried about cost ...

Thanks for any help.

Posted: Thu Oct 25, 2007 7:32 am
by gert
You'd need a rather fast chip, and "abuse" it for software-only USB protocol. To my knowledge, µCs fast enough for your this task (~ 100MHz)
a) have both a cache and a pipeline, so fixed timing for "bit-banging" low level protocolls is (at least) difficult to implement, and
b) often have a hardware USB controller,

The obvious choice would be µC with USB controller, it doesn't even need to be fast ;-).

What I don't understand from your description (no specification of "device"): why don't you just use a USB-USB crosslink interface? Or two cross-linked USB to ethernet interfaces?

Posted: Thu Oct 25, 2007 10:34 am
by Guest
gert wrote:What I don't understand from your description (no specification of "device")

Sorry I was a bit vague on what the device is, didn't want to write a wall of text and scare people off =)

So this is the setup:

HOST -- Not a PC, so I can't write a device driver to do what I need.
Device A -- Provides many data inputs into the host, some of which I'd like to replace with my own data.
Device B -- My own device, based on some logic this device would place some data on the bus, but here is the tricky part, the host is asking Device A for this data. So it must think its coming from device A. All this while Device A is somehow 'muted' so as not to cause chaos on the bus.

In other words, I need a device that will hook into a USB host and into 2 devices and pick which one of the 2 gets to 'talk' to the host.

AVR-USB seemed like a great solution since it is fully driven by software I can code the logic that picks which device gets to respond to the host. A friend suggested using 2 x MAX3421E and an MCU but I simply do not have the tools to put this together and after some looking around I never found a ready made solution.

Posted: Thu Oct 25, 2007 1:12 pm
by gert
AVR-USB is "least-cost low-speed USB". No bad feelings, but I'd recommend that you look somewhere else.

Posted: Wed Oct 31, 2007 1:48 pm
by christian
What you want is definitely not possible with AVR-USB and the AVR in general.

I would recommend that you use a controller with USB Host and USB Device hardware. With both of these you can implement a USB bridge and do any protocol filtering you like. However, you can't use standard drivers and creating your own drivers is not much fun...