hey can anybody help me.. i want to interface my hardware with the PC through usb port.... and my application program is written in vb6.0...so do i need WIN DRIVER type software for low level programming and then call win driver libraries in vb 6.0 or else? can somebody send some sample code in vb6.0 for this that can help me?...thanx in advance

hey can anybody help me.. i want to interface my hardware with the PC through usb port.... and my application program is written in vb6.0...so do i need WIN DRIVER type software for low level programming and then call win driver libraries in vb 6.0 or else? can somebody send some sample code in vb6.0 for this that can help me?...thanx in advance

What USB device are you wanting to use? What hardware are you wanting to interface? What specifically are you trying to accomplish?

You simply haven't given enough information to provide an answer.

i m using PIC 16C745 microcontroller for usb interfacing.....and my hardware sends data from port pins of microcontroller 18C52 to 16C745.....and then to usb port........i want to perform operations on data coming from usb port....i mean i want to access that buffer containing data coming from usb port.....if u have any idea about this then please tell me...i have to perform this work in a week...and i m so worried

VB6 has support for serial ports. You could purchase a USB to serial adapter and use a Microsoft COMM control in that case. But that seems to be your only option with working with Visual Basic, if the hardware manufacturer did not supply any drop in ActiveX controls, DLLs, etc.

If he did, most of your work is already done and you won't need a USB to serial adapter.

If not, then your manufacturer better have supplied with you with some SDK detailing how the hardware responds to communication events.

But you would have to some knowledge about how to set the baud rates. receive modes (binary or text), and how the device responds inside the ONCOMM event. Most of your coding will take place there inside the ONCOMM event:

Private Sub MSComm1_OnComm()

End Sub

-------------------------------------------

"I smell a rat"

actually i have already used RS232 port with that hardware and that is working too.....but i need to interface with usb because this is objective of our project....have u ever used windriver software for usb interfacing? and do u have any idea about that?

windriver software

What's windriver software?

If you don't have a drop in DLL or ActiveX control provided by the manufacturer that can be used by VB6, then you need to develop your own. Consult the USB Communication Device Class (CDC) Specification version 1.1 for further details. Your questions are outside of the scope of this particular forum. This is Visual Basic 4/5/6 with emphasis on the BASIC.

How to detect USB device connected to PC in VB6 programm

How to detect USB device connected to PC(to know COMM port of USB port to which External device is connected) in VB6 programme?

Read the book of Jan axelson the title is " USB complete the developer's guide 4th ed" you can get an idea on how to interface a mcu using vb code. Also in this link http://www.alanmacek.com/usb/ It discusses about the PIC16C745 and PIC18F2455.

Best regards,
glenndr_15

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.