Member Login
member
passwd
remember me on this computer.

- join now -

Search

Neat Stuff

Visit our shop for nerds in control lifestyle products.

Cool stuff
Select a topic of interest:
...and press:
Fortune
To doubt everything or to believe everything are two equally convenient
solutions; both dispense with the necessity of reflection.
-- H. Poincar'e
RSS Feed
RSS feed Use this link to get an RSS feed of the Control.com article flow, for private, non-commercial use only:
www.control.com/rss
Select a Page Style
Select one of the following styles:
- BluFu
- Classic
(cookies required)
from the Automation List department...
How to configure USB port in Visual Basic
Languages topic
advertisement
Posted by venkat on 15 October, 2005 - 3:32 pm
Hello friends,
I want to connect USB port using VB How can I do that without using USB to RS232 converter? Can any one help me to know how can I connect USB port. I am using the device which uses data transfer at high speeds which cannot be supported using USB to RS 232 so can you please let me know how I can directly connect to the USB port using my GUI.

Thank you,
mail me back to venkatsubbarao@gmail.com

Posted by Robert Scott on 15 October, 2005 - 8:57 pm
You don't say what USB device you wish to communicate with. The class of that device and the device driver associated with that device will dictate how you can access it in VB.

See the book "USB Complete" by Jan Axelson.

Robert Scott
Real-Time Specialties
Embedded Systems Consulting

Posted by Venkat on 18 October, 2005 - 11:03 am
I m using a Mitshibushi controller which is having USB feature and its belong to communication class. Actually we are developing this device so we have to configure the class in the software in the device side. We are using the driver provided by thesycon for this device

Posted by Dr. R. Erlich on 12 November, 2005 - 12:17 am
VB GUI sample, DLL code and more--

EID, Corp. is an OEM manufacturer (100% made in U.S.A) for many kinds of E-USB boards and kits, such as I/O, ADC, timer, counter, etc. You will be able to control directly from your PC via USB port. Yes, free DLL and other free software...

Write your code, application utilizing our free DLL.

See the following links:

1. Free VB, C++ etc. DLL and demo software E-USB PC-ports kits:

http://www.eidusa.com/Electronics_Kits_EUSB_DLL.htm

http://www.eidusa.com/Electronics_Kits_EUSB_Software.htm

2. Electronic Kit (DIY), I/O and more via E-USB:
http://www.eidusa.com/Electronics_Kits.htm

Regards,

Ron

Posted by Nathan on 17 November, 2005 - 12:13 am
Hello,

I was searching the net for some FAQs on this exact subject so i thought I would jump the band wagon. I am a student and am working on a project at my school that requires me send 4 bit signals to a transmitter. the connection on the transmitter is connected via DB-9 serial, my problem is when I interface with my laptop there is no DB-9 present so i purchased a USB-SERIAL converter. Here is where im lost and i have lost my mind trying to figure this out. I have code written in VB however during the testing phase I wrote the code and tested at my home computer (using the DB-9 serial) and it worked fine. however when i used the adapter (USB) at my school I got all sorts of mscomm port errors. I was told that i had to modify my code to the USB. Any help here would be greatly appreciated.

Nathan

Posted by Starride on 18 November, 2005 - 1:58 am
I have a USB to serial that I bought for 78 bucks from radio shack, been using mine for 2 years now, have not found a thing that it has not worked with and I use mine at least once a week.

They still sell it.

Posted by Nathan on 18 November, 2005 - 11:40 pm
But do you use it for VB 6.0? If so what is the brand maybe I could look for it?

Nathan

Posted by Starride on 22 November, 2005 - 1:56 am
Give me your e-mail address and I will send you some test source code in VB 6.

Posted by eric on 23 November, 2005 - 1:07 pm
hi, i am also looking for VB6 code samples to control a USB-HID device, i would appreciate if you can also send one for me. thanks a lot.
email: ericgmejia@yahoo.com

Posted by nathan on 2 December, 2005 - 12:18 am
Hey Starride,

here it is:
natefajardo@gmail.com

thanks

Posted by Seth Fuller on 25 January, 2006 - 12:39 am
Hey Starride,

Please kindly send the VB6 example USB-Serial code to my email. sfuller94@yahoo.com

Thanks,
Seth

Posted by Akhtar Hussain on 13 December, 2005 - 2:19 am
Dear sir,

Kindly give me the vbcode, how to cofigure USB port. I am using Righttag scanner to read & write data into tag using vbapplication.

Here is my e-mail address:
akhtarrs@gmail.com
thanx.

Posted by Anonymous on 12 March, 2006 - 1:07 pm
Hey Starride,
Please kindly send the VB6 example USB-Serial code to my email. mourad.abdelbaki@wanadoo.fr

Thanks, Mourad

Posted by Anonymous on 5 April, 2006 - 11:49 pm
khalid_hanifm@yahoo.com

Posted by cyborg2g on 18 April, 2006 - 10:00 pm
I am testing printer that hook to USB and I am using Visual Studios 2003. Do you have any code that will help me be able to communicate to these printers using VB or VB.Net. These printers are the ones you see in hospitals that make the id bracelets.

Thanks.

Posted by Anonymous on 14 June, 2006 - 3:30 am
i'm also looking for vb or vb.net code to configure USB port.

pls kindly send the code to my email: algareebnet@yahoo.com

thanks,

Posted by malvika on 28 June, 2006 - 12:03 am
I m working in a manufacturing company. It would be gr8 to have the code in VB 6.0 that configures the USB port. Please send me the code on malvika.joshi@rediffmail.com as soon as possible.

It would be really helpful...
Regards

Posted by Anonymous on 25 April, 2006 - 12:26 am
hey starride, if ur still giving out that source code could you please send it to my email scorpiom84@aol.com?
...I'm working on a senior design project that requires me to take in data from a USB port.

Posted by greg on 23 May, 2006 - 10:49 pm
Hello,

I need also some help with Visual Basic to write USB driver. To be exact I need to send some ASCI strig over USB to another UNIT.

Here is my email: gvgregor@yahoo.com.

Thanks,
Greg

Posted by Mayowa on 28 May, 2006 - 3:53 pm
Please Starride can I still have the test code for USB in VB6. Thank you. email addy is mawobadejo@gmail.com

Posted by Anonymous on 11 August, 2006 - 10:57 pm
plz five me the usb source code in vb 6. i really need it. this is my e-mail: saikoy@gmail.com

Posted by Quinh on 18 September, 2006 - 10:34 pm
Hi Starride,

pls send me your source codes in VB6 or VB.NET. My mail: quinhngoc@yahoo.com

Thanks.

Posted by Anonymous on 24 April, 2007 - 1:27 am
If you have a code for connecting a scanner to VB or VB.net, please send it, I will grateful to you.

Posted by Anonymous on 31 May, 2007 - 1:53 am
I'm a Spanish student. I'm investigating about connection USB with VB 6.0. Until now, in my view, the device and the conection type are not specifices (serial, bluetooth...).

If somebody has code for connecting some device with VB 6.0, please send it, I will be grateful to you.
potypoty55 @ yahoo. es

Posted by Paul on 14 December, 2006 - 9:26 pm
Hi,

Could you please also send me details of the USB-Serial interface and VB source code?

Thanks,
kathymay@ozemail.com.au

Posted by Anonymous on 4 January, 2007 - 11:09 pm
I would be interested in your visual basic code, if you are still giving it out. My email is andy @ egl-neon. com. Thank you.

Posted by Anonymous on 27 January, 2007 - 1:07 am
I would be interested in your visual basic code, if you are still giving it out. My email is KandM3301 at midsouth. rr.com. Thank you.

Posted by Anonymous on 23 February, 2007 - 12:26 am
Hello!

I'm a student, and a need this code to conect and control a usb-bluetooth on vb6. Can you send me this code, please? Thank you very very very mch.

nonoweb20@hotmail.com

Posted by aaa on 25 October, 2007 - 9:57 pm
Please send me
farzadmn2 @ yahoo. com

Posted by Anonymous on 16 January, 2006 - 5:26 pm
MSCOMM must have pin 1 of the DB9 serial point at a high level or it will not initialize. Dumb limitation but a fact to deal with.

Posted by Bob on 29 May, 2006 - 9:54 pm
Hello,
I dont think you need to change your code, this is a similar problem i had while communicating with a PLC.

The serial converter sets itself up (with the help of the driver) as a standard com port.
So you need to go into control panel/system/ports and check which port it has assigned for the adapter eg com1/com2 etc.then you can set up your mscomm port settint to the correct port value.Beware if you have more than one USB port and you plug your serial adapter into a different one the computer will re assign a new com port number.

hope this helps
Bob

Posted by Anonymous on 2 August, 2006 - 9:55 am
Hello!

I 'm a student and I want to connect the PPC to other device (such as microcontroller) across USB port. Hence i need some help.

pls kindly send the source code to my email: wing.ho@student.adelaide.edu.au

Thank you very much!

Posted by javadarefi on 10 August, 2006 - 11:52 am
Hi
If you want to connect your PC to microcontroller through USB port,your microcontroller must have USB port or you have to buy additional IC that convert USB to serial.
For example you can check http://www.ftdi.com and search for ft232bm. It is USB to RS232 convertor.

I you have any problem you can mail to me.
javadarefi@yahoo.com

Posted by loic on 22 February, 2006 - 12:23 am
Hello,

I 'm a student and I want to connect USB port using VB or VC++ with a full speed rate. How can I do? Where can I fing dll files... to help me?

Thank you,
mail me back to loic.baglin@gmail.com

Posted by Anonymous on 16 August, 2007 - 11:20 pm
Hi,

I'm also doing some testing that access to USB port. Is there anyone who has the VB code for this? Please forward it to me at cool_y2@yahoo.com

Thank you very much.

Posted by Rania Ahmed on 24 September, 2007 - 11:45 pm
Hi,

I'm working on my thesis, and I'm in bad need to the VB6 source code to access the USB port for a custom device (FPGA developed USB device), and also for a printer that I'm having some problems to deal with.
I do appreciate it if you can send me this code.
rania_a7mad@yahoo.com or rania_a7mad@hotmail.com

Thank you very much! :)

Posted by Brian U on 7 November, 2007 - 8:29 pm
Bob (on this thread) had the best advice... If you're converting from USB to serial device (i.e. newer laptop/PC to older device), you must have a USB to serial cable, install the drivers that come with it; reboot your pc; plug in the USB cable (doesn't have to be connected to device on other end); go to Control Panel, "Ports" to confirm it's now enabled in Windows and to see which Comm port it is now - mine was Comm 4. Finally, go to the VB code and edit it to find Comm 4. In my case, the code was originally, "MSComm1.CommPort = 1" I simply had to change it to "MSComm1.CommPort = 4".

Hope this helps.

Posted by Anonymous on 15 November, 2007 - 2:12 pm
Hi,

I'm doing the same you did. If you had some news can you forward to me at marchesani.enrico @ libero. it?

Thank You.

Posted by Roxanne on 19 January, 2008 - 12:29 am
Hi,

I'm working on a thesis where my microcontroller sends data vis serial, but I have to use USB to connect it up to my computer. I would really appreciate it if someone could send me the code that was discussed above to my email.

r. panthaky @ hotmail. com

Thank you so much.

Posted by anonymous on 11 March, 2008 - 12:18 am
Hi,

I am working in communicating a Thrustmaster joypad with B to control servos. If anyone could pass me some code, I would be very grateful.

manin1952 @ hotmail. com

Thanks.

Posted by Adison on 1 May, 2008 - 12:52 am
Hi all,

Please can anyone send me some code for controling the USB port using VB.NET? Send them to: t_adison @ Hotmail. com

I will need to control my USB port in my project, so I am doing some research to obtaine some code but it sucks!

Any help?

Thank you very much.

From Control Engineering magazine...
Related articles from Control Engineering magazine
Above articles copyright 2008 Reed Business Information. Subject to its Terms of Use.

Your use of this site is subject to the terms and conditions set forth under Legal Notices and the Privacy Policy. Please read those terms and conditions carefully. Subject to the rights expressly reserved to others under Legal Notices, the content of this site and the compilation thereof is © 1999-2008 Control Technology Corporation. All rights reserved.

Users of this site are benefiting from open source technologies, including PHP, PostgreSQL and Apache. Be happy.

Advertisement
Our Advertisers
Help keep our servers running...
Patronize our advertisers!