Go Back  Xtreme Visual Basic Talk > General Discussion > Tech Discussions > Control A USB Port Device


Reply
 
Thread Tools Display Modes
  #1  
Old 11-18-2008, 12:54 PM
The_Programmer The_Programmer is offline
Newcomer
 
Join Date: Nov 2008
Posts: 2
Smile Control A USB Port Device


Hello Everybody i want to create a program to let me have the ability to control a USB device such as ( A motor or a LED etc.. . )
If anyone can help i appreciate very much.
Reply With Quote
  #2  
Old 11-18-2008, 04:46 PM
dilettante's Avatar
dilettante dilettante is offline
Underclocked lifestyle

Forum Leader
* Guru *
 
Join Date: Feb 2005
Location: Michigan, USA
Posts: 4,339
Default

If someone creates a "USB motor/LED" product they must make it appear to Windows as some standard device type or provide drivers and an API if it is to be a custom device.

Think of USB the way you think of PCI, AGP, ISA, ATA, etc. slots. You don't control the slots, you control the devices plugged in. In other words there is no such thing as generic use of the USB Host Adapter. It is nothing like COMn: ports in its nature or intended use. It is an expansion port.
Reply With Quote
  #3  
Old 11-18-2008, 11:10 PM
The_Programmer The_Programmer is offline
Newcomer
 
Join Date: Nov 2008
Posts: 2
Default

Thanks For your Reply, But as i understood we cant do this through a USB Port.
Ok If I want to do so through a COM port is that possible? And how?
The way i want to control this device is through a visual basic 6.0 program, but how to create this program.
If anyone can help Please.

Last edited by The_Programmer; 11-18-2008 at 11:49 PM.
Reply With Quote
  #4  
Old 11-19-2008, 05:30 AM
darkforcesjedi's Avatar
darkforcesjedi darkforcesjedi is offline
Trust me, I'm an

* Expert *
 
Join Date: Apr 2001
Location: In ur base, pwnin d00dz
Posts: 1,964
Default

VB doesn't natively support Parallel or COM communications, but if you get yourself WIN95IO.DLL, it has the functions vbIn and vbOut which enable this. (InpOut32.dll works as well)

How you operate an attached device depends entirely on how it's designed. You can create a circuit directly connecting an LED and a resister between one of the +5V data pins and the ground. Switching the data pin on and off would turn the LED on and off.
__________________
To err is human; to debug, divine.
Reply With Quote
  #5  
Old 11-19-2008, 06:19 AM
mkaras's Avatar
mkaras mkaras is offline
Ultimate Contributor

Retired Leader
* Expert *
 
Join Date: Mar 2004
Location: Beaverton, OR
Posts: 1,874
Default

There are many many "devices" that connect to a computer via the USB interconnection system. You (i.e. TheProgrammer) have not focused in on the specific device so it would appear that you are trying to comprehend how you may control a 'generic' device through a USB connection. In the general case it is necessary to design up the hardware and write the software for both ends to get a USB device operational or get a ready made device where someone else has already done the work for you. Now all that said there are a fair number of USB devices out in the market that provide some of the PC to target interface by providing the USB connection for you and then you can provide the adaption on the target end of the thing to get the device attached to your specific end hardware/device. Here are some examples of some of these interface connectivity solutions....

http://www.dlpdesign.com/usb/usb232.shtml

http://sewelldirect.com/usbtoparallel.asp

http://www.pc-control.co.uk/minibee_info.htm

http://www.totalphase.com/products/aardvark_i2cspi/

http://www.kaboodle.com/reviews/led-...put-controller

http://www.xjtag.com/jtag-tools/xjlink-jtag-usb.php

http://www.measurementcomputing.com/...N78NVNRB7WBPC7

http://www.sealevel.com/product_deta...rface_Adapter_

http://www.pc-control.co.uk/motorbee_info.htm

http://www.gadgetshop.com/Gadgets/Te...e+Launcher.jsp

http://www.mensup.fr/usbwine/?act=in...WINE&o=92&p=61
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->