Address of USB Port to Code in VB to Send Signals

J

Thread Starter

juvin

How i can send simply a signal through USB port to run a motor. I want code in VB (exactly how to define USB port to send signal) to send signals in binary through USB. like to send signal through 25 pin connector in PC address is 0x398 something.
 
K
The USB ports have no addressable io (just two comms signals). You would need to have an interface card plugged into the USB port. A driver would probably be supplied with the card allowing VB interfacing. You could add your own USB interface chip and design your own interface and write the windows driver but this is a lot of effort, look at the Elektor Electronics they have done several USB interface designs http://www.elektor.com/

Kevin
 
Actualy I want to build a line follower bot using image processing with a WebCam and dc motors. Did you get the solution to this USB signal problem? Please mail me the solution.
 
Kevin, I am very interested in doing something similar. If you find out how to do it, please e-mail me. Thanks!
 
K
Hi,

It really depends on what you want to do. There are plenty of designs and commercial hardware available that can be programmed. I use a piece of hardware supplied by Labjack. The important thing to realise is that USB does not allow pin addressable IO and you will need to have an interface connected to the port. The Elektor electronics mag Nov 2009 has an article 'Driver free USB interface' that demonstrates a simple interface and software.

Kevin
 
F
Jan Axelson has written a series of books on the topic of I/O access via VB. She has a book titled <i>USB Port Complete</i>. I haven't read it, but I have read some of her others works. Based on the quality of her other books, I would expect it to be what you need.
 
G

George Bailey

Here is the idea of this problem. Some how the software communicates with the USB port. There is data sent through the USB cable telling the interface what to do. The USB device is given a identity that the computer uses to find the USB device. This identity is a number like "2310112". This may be a memory location that points to an address that is the base address of the USB device. If this is the case and if this is how it works then creative communications can be done with user written software. The problem is that I can't find an explanation of how all this works. Manufacturers do, as a rule, supply software with USB devices but it is usually complicated and to over written for novices and experimenters. A novice or experimenter can't devote all the energies required to learn manufacturers software and design their equipment too. The project becomes overwhelming. You can't just say there is no way to communicate with a USB device because this is not true. There is software that comes with the device that does it therefore a computer is capable. The question is how. I believe it is not that complicated if the information is available. The biggest problem is that different devices communicate differently and have different functions, none-the-less manufactures could furnish basic information regarding ports and data needed to be sent for different functions of the USB device. These basic rules would apply to all USB devices and eventually users could begin to understand the idea behind USB interfaces and we could all create our own little projects with more effectively.
 
Top