PDA

View Full Version : Connecting to USB




purplelizzard
Feb 24, 2007, 12:21 PM
Is there anyway to send data directly to a USB port? What I want to do is have a USB cable hooked up to a USB port and hook up a transistor or something like that to the cables coming out of it and write a program to turn the transistor on or off.

If this isn't possible with USB, what can I use to do this?



wittegijt
Feb 24, 2007, 02:47 PM
Is there anyway to send data directly to a USB port? What I want to do is have a USB cable hooked up to a USB port and hook up a transistor or something like that to the cables coming out of it and write a program to turn the transistor on or off.

If this isn't possible with USB, what can I use to do this?

It is possible sending data to a USB port using IOKit. But your receiver also needs a USB controller, you can't communicate directly with a transistor. A solution would be a USB microcontroller using it's digital io ports. I have done this, and it works.

Wittegijt

purplelizzard
Feb 24, 2007, 02:52 PM
Where can I get one and how do I do that? Also, is it possible to use FireWire or Ethernet instead? I suspect FireWire is the same as USB, but what about Ethernet?

thanks

SMM
Feb 24, 2007, 02:59 PM
You did not specify exactly what your application is, but you might find this site useful.

http://www.nxp.com/

wittegijt
Feb 24, 2007, 04:35 PM
Where can I get one and how do I do that? Also, is it possible to use FireWire or Ethernet instead? I suspect FireWire is the same as USB, but what about Ethernet?

thanks

You are looking for something like this http://www.devasys.com/usbi2cio.htm. You can find cheaper solutions, I bought mine for 12. The documentation is usually for windows, but it is not that difficult to figure out. There are also kits for FireWire and ethernet, you can use all three (I have used only USB). Sample code is in /Developer/Examples/IOKit/usb if you have installed the developers tools.

Wittegijt