0
\$\begingroup\$

I am attempting a project that is a basic usb keyboard logger. I plan on using a PIC32 microcontroller that has built in USB host capabilities to interface to the keyboard.

My question is, can i hang off in parallel my MCU to read the data lines without affecting what is sent to the computer? See the below picture.

enter image description here

Is this acceptable practice, or does the data need to be fed in series from the input->mcu->output connector? Any issues with current draw?

Thanks!

\$\endgroup\$
0
\$\begingroup\$

No, this will not work. You will need either a µC with two USB ports (one host, one device mode) or two controllers.

USB works with exactly one host on a bus, and when you want multiple devices you have to use a hub. Note that a PC is always in host mode.

| improve this answer | |
\$\endgroup\$
  • 1
    \$\begingroup\$ As I read the original post, the MCU will only monitor the USB traffic - it will be neither host nor device. I suspect this would work, but I don't know enough about USB to make a definite statement. \$\endgroup\$ – Peter Bennett Jan 9 '15 at 0:25
  • \$\begingroup\$ I don't think that Pic32 supports USB monitor mode. OP clearly wants to use host mode. \$\endgroup\$ – Turbo J Jan 9 '15 at 0:26
  • \$\begingroup\$ Thanks. Seems like I will need to use an additional chip that can act as a device to forward the data on to the PC \$\endgroup\$ – user25485 Jan 9 '15 at 0:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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