Electronic – Dual Role USB device on AVR

hostlufausbusb device

Is it possible to run both USB Host and USB Device controllers on top of an AVR (ATMega64)?
Specifically, what I'm looking for is to receive data from a usb keyboard, and simultaneously sending keystrokes to a PC.

From what I've seen, both VUSB & LUFA stacks support USB host modes, but they work with a single usb port only.

Any help is appreciated!
Thanks!

Best Answer

  1. I don't think that V-USB supports host (OTG) mode and LUFA host mode will require at least an AT90USB646 which is quite expensive.

  2. I don't know about a cheap micro that has 2 USB port but you may try using two. Just connect them via an UART and exchange the needed information.

That said, davr is probably right that using a PS/2 keyboard would be simpler.