| Author |
Message |
avl
Joined: 29 Dec 2004 Posts: 9
|
29 Dec 2004 10:11 how to communicate between 8051 microcontroller and USB??? |
|
|
|
I'm now doing a project, I'm using visual basic 6.0 to communicate with the USB device. My problem now is,
Do I need an ActiveX control driver to start interfacing with the USB device??
What is the driver?
|
|
| Back to top |
|
 |
nicleo
Joined: 06 Sep 2004 Posts: 717 Helped: 60
|
29 Dec 2004 10:20 how to communicate between 8051 microcontroller and USB??? |
|
|
|
In my opinion, the title of the post and the content of the post are not matched.
I try to understand your question. You build a 8051 based device. The device has USB interface. You wish to write a VB program to communicate with the device via USB. Am I right?
|
|
| Back to top |
|
 |
avl
Joined: 29 Dec 2004 Posts: 9
|
29 Dec 2004 10:25 Re: how to communicate between 8051 microcontroller and USB? |
|
|
|
yes, you're right.
So what should I do?
I needed a driver to start interfacing to the USB device right?
|
|
| Back to top |
|
 |
nicleo
Joined: 06 Sep 2004 Posts: 717 Helped: 60
|
29 Dec 2004 10:28 how to communicate between 8051 microcontroller and USB??? |
|
|
|
Yes ... You need a driver.
Which USB IC do you use? Usually manufacturers of the USB peripheral IC provides the driver in their websites.
Have you considered USB chip from FTDI?
|
|
| Back to top |
|
 |
avl
Joined: 29 Dec 2004 Posts: 9
|
29 Dec 2004 10:38 Re: how to communicate between 8051 microcontroller and USB? |
|
|
|
I'm using the Intel(r) 823801BA/BAM USB Univaersal Host Controller.
I'm not sure whether this is the one you ask for.
|
|
| Back to top |
|
 |
bilgekaan
Joined: 18 Nov 2004 Posts: 118 Helped: 14 Location: Turkiye
|
29 Dec 2004 11:05 Re: how to communicate between 8051 microcontroller and USB? |
|
|
|
also you can use HID class to communicate with usb device without a driver.
checkout this link for more info
http://www.lvr.com/hidpage.htm
|
|
| Back to top |
|
 |
Ace-X
Joined: 25 Jan 2002 Posts: 594 Helped: 26
|
29 Dec 2004 12:55 Re: how to communicate between 8051 microcontroller and USB? |
|
|
|
| avl wrote: |
I'm using the Intel(r) 823801BA/BAM USB Univaersal Host Controller.
I'm not sure whether this is the one you ask for. |
nicleo asked about another side of USB cable. Which USB controller do you use together with your 8051 uC? Is it embedded USB, like on C8051F321? Or external like FT245 or one from Cypress?
I guess it would be better if you can provide us with your schematic or at least the full title of ICs on your board, otherwise it will be long play in guess.
|
|
| Back to top |
|
 |
avl
Joined: 29 Dec 2004 Posts: 9
|
30 Dec 2004 4:04 Re: how to communicate between 8051 microcontroller and USB? |
|
|
|
| I think I'm using an embedded USB, my USB port is embeded on the motherboard....
|
|
| Back to top |
|
 |
checkmate
Joined: 25 Feb 2004 Posts: 489 Helped: 35 Location: Toilet Seat
|
30 Dec 2004 4:29 Re: how to communicate between 8051 microcontroller and USB? |
|
|
|
| To have usb communication, you need a usb device and a usb host. Most motherboards have built-in usb host. What we are asking is your usb device. An 8051 alone cannot serve as a usb device. You need a separate usb device controller.
|
|
| Back to top |
|
 |
Ace-X
Joined: 25 Jan 2002 Posts: 594 Helped: 26
|
30 Dec 2004 4:49 Re: how to communicate between 8051 microcontroller and USB? |
|
|
|
| checkmate wrote: |
| An 8051 alone cannot serve as a usb device. You need a separate usb device controller. |
Actually, it can. For example, AT89C5131 from Atmel, C8051C321 from SiLabs, also some USB controllers from Cypress have 8051 architecture, so they can be considered as 8051 with USB on-chip. Anyway, looks like avl doesn't understand our questions.
avl, give us schematic of your 8051 board, or at least the full name of all components on your 8051 board! It is impossible to help you without this info.
|
|
| Back to top |
|
 |
checkmate
Joined: 25 Feb 2004 Posts: 489 Helped: 35 Location: Toilet Seat
|
30 Dec 2004 5:32 Re: how to communicate between 8051 microcontroller and USB? |
|
|
|
| Ace-X wrote: |
| checkmate wrote: |
| An 8051 alone cannot serve as a usb device. You need a separate usb device controller. |
Actually, it can. For example, AT89C5131 from Atmel, C8051C321 from SiLabs, also some USB controllers from Cypress have 8051 architecture, so they can be considered as 8051 with USB on-chip. Anyway, looks like avl doesn't understand our questions.
avl, give us schematic of your 8051 board, or at least the full name of all components on your 8051 board! It is impossible to help you without this info. |
Those are simply 8051 variants with additional on-chip usb controllers. The only exception I've seen was the amazing IgorPlug.
|
|
| Back to top |
|
 |
avl
Joined: 29 Dec 2004 Posts: 9
|
30 Dec 2004 9:44 Re: how to communicate between 8051 microcontroller and USB? |
|
|
|
| can teach me how to check for the schematic or full name of all components on my 8051 board?
|
|
| Back to top |
|
 |
Ace-X
Joined: 25 Jan 2002 Posts: 594 Helped: 26
|
30 Dec 2004 10:40 Re: how to communicate between 8051 microcontroller and USB? |
|
|
|
| Quote: |
| Those are simply 8051 variants with additional on-chip usb controllers. |
Those on-chip usb controllers are integrated, so we should consider them as a feature of particular 8051 variants. Like on-chip UART, SPI, 1-Wire etc.
| avl wrote: |
| can teach me how to check for the schematic or full name of all components on my 8051 board? |
Are you joking with us? You can send photo in good resolution of your 8051 board - I guess it would be the best way.
|
|
| Back to top |
|
 |
avl
Joined: 29 Dec 2004 Posts: 9
|
03 Jan 2005 4:25 Re: how to communicate between 8051 microcontroller and USB? |
|
|
|
| I change to a intel pentium 4 motherboard to control USB. What is the driver that I need to interface with the USB device? I'm running on window xp.
|
|
| Back to top |
|
 |
checkmate
Joined: 25 Feb 2004 Posts: 489 Helped: 35 Location: Toilet Seat
|
03 Jan 2005 8:01 Re: how to communicate between 8051 microcontroller and USB? |
|
|
|
| USB is unlike the serial port. It has many drivers depending on how your device firmware is written. Most of the time, a custom driver is required. That's the reason why we need details of your usb device, as well as the way the firmware was written. In particular, we need to know if the device firmware was written to be compliant to any of the device classes. We cant give you an answer until you provide these details.
|
|
| Back to top |
|
 |
avl
Joined: 29 Dec 2004 Posts: 9
|
03 Jan 2005 10:58 Re: how to communicate between 8051 microcontroller and USB? |
|
|
|
| This is the files of the USB device that needed to work. I have zip it together, it is a Tunable Fiber Bragg Grating Device for filtering out specific wavelength. But it is in C++ programming... I need to program in visual basic, but without the compatiable driver for visual basic, I can do nothing.... please help me to solve it.... sorry for troubling so long......
|
|
| Back to top |
|
 |
devennan
Joined: 07 May 2004 Posts: 70 Helped: 4 Location: India
|
03 Jan 2005 11:08 Re: how to communicate between 8051 microcontroller and USB? |
|
|
|
Intel(r) 823801BA/BAM USB Univaersal Host Controller. that you mentioned is on you mother board
no matter if you change the mother board to p4 it is more important to know what type of USB device are you trying to connect to apart from the USB port that is on you machine is this 8051 variant a storage device or controlling device have you designed this board or bought it , if you have bought it the manufacturers would have the driver else you will need to write the driver by you self
are you using linux or windows ?
I may be able to help you reply to me
|
|
| Back to top |
|
 |
avl
Joined: 29 Dec 2004 Posts: 9
|
03 Jan 2005 11:12 Re: how to communicate between 8051 microcontroller and USB? |
|
|
|
| I'm using window xp..... but I cannot attach the files that is provided with the USB device..... How should I do to attach it for you?
|
|
| Back to top |
|
 |
svicent
Joined: 11 Jul 2001 Posts: 405 Helped: 20
|
03 Jan 2005 11:30 Re: how to communicate between 8051 microcontroller and USB? |
|
|
|
You can use the 8051 UART and the USB-UART Bridge CP2102 from Silicon Laboratories.
Regards,
|
|
| Back to top |
|
 |
checkmate
Joined: 25 Feb 2004 Posts: 489 Helped: 35 Location: Toilet Seat
|
03 Jan 2005 11:50 Re: how to communicate between 8051 microcontroller and USB? |
|
|
|
| avl wrote: |
| This is the files of the USB device that needed to work. I have zip it together, it is a Tunable Fiber Bragg Grating Device for filtering out specific wavelength. But it is in C++ programming... I need to program in visual basic, but without the compatiable driver for visual basic, I can do nothing.... please help me to solve it.... sorry for troubling so long...... |
There is no such thing as a "compatible driver for visual basic". A driver usually consists of an inf file and a sys file. The inf file contains information that loads the driver contained in the sys file into the device tree, similar to a driver installation file.
Most probably, these files would have to be provided for your particular device, and may contain device-specific codes. You'll have to consult your device documentation on this.
Applications would have to use DeviceIO methods to access the driver. Refer to http://msdn.microsoft.com/library/default.asp?url=/library/en-us/devio/base/device_i_o.asp. It's basically a system dll interface, and therefore independent of whether you use VB or C++.
I don't use VB, so I do not know how it accesses dll interfaces. But if you use .NET, you can refer to http://custom.programming-in.net/articles/art9-2.asp?lib=kernel32.dll.
All these are assuming that your usb device uses a custom driver. If it uses a specific device class, such as HID, or if uses those serial-to-usb convertors, then the interface would be different. As what I'm always trying to say, we cant help much unless you provide more details.
|
|
| Back to top |
|
 |