Tell me more ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

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!

share|improve this question

2 Answers

up vote 1 down vote accepted
  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.

share|improve this answer

You might consider using a PS/2 keyboard, they are simple to interface with, it's basically just a serial protocol. Then you can still use USB in Device mode to connect to the host PC.

share|improve this answer
1  
You can even make it look like fake USB - many keyboards I have seen are dual-mode USB and PS/2. You could have a USB connector wired up like the "USB to PS/2" adapter and just interface using PS/2. Don't know if the requirement is USB or just a keyboard with a USB connector. – W5VO May 2 '10 at 7:59
2  
IIRC most of these keyboard and mouse adapters did not contain any logic and required the mice/keyboards to have true USB signals on the PS/2 connector (which has 2 unused pins). – jpc May 2 '10 at 16:26
Actually I'm looking for a way to work with a real USB keyboard, but in case that will get complicated, I'll sure go with the PS/2 option. Thanks for the advice! – mentalist May 2 '10 at 23:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.