tags:

views:

47

answers:

1

Hi, few days ago I asked here about implementing USB. Now, If I may, would like to ask few more questions, about thing I dind´t quite understood.

So, first, If I am right, Windows has device driver for USB interface, for the physical device that sends and receives communication. But what this driver offers to system (user)? I mean, USB protocol is made so its devices are adressed. So you first adress device than send message to it.

But how sophisticted is the device controller (HW) and its driver? Is it so sophisticated that it is a chip you just send device adress and data, and it writes the outcomming data out and incomming data to some internal register to be read, or thru DMA directly to memory?

Or, how its drivers (SW) really work? Does its driver has some advanced functions like send _data to _device? Becouse I somewhat internally hope there is a way to directly send some data thru USB, maybe by calling USB drivers itself? Is there any good article, tutorial you know about to really explain how all this logic works? Thanks.

+2  A: 

The USB protocol stack has several layers and is quite complex. You really need to read a good book on USB (e.g. USB Complete) to get an understanding of how it all fits together. The bottom line though is that you want to go as high up the protocol stack as you can, ideally using a system level API (e.g. if it's a USB HID device then just treat it like any other HID device, rather than thinking if it as a USB device - ditto for mass storage devices, etc).

Paul R
Wow, this seems really complex. So, basically some functionality is pure software, some pue HW. But you know, there are many new USB devices everyday, so is it really so complex to use USB in your application?
B.Gen.Jack.O.Neill
It's not complex at all if (a) your device fits into one of the existing USB device *classes* and (b) you have a driver for it. E.g. if it's just another USB mouse or disk drive then it requires little or no effort. If it's a USB hovercraft then you'll have some work to do.
Paul R
Well, don´t laugh, but it is actually USB car, USB would be use just for pre-launch settings.
B.Gen.Jack.O.Neill
What USB device do you have on the car ? Or is that not defined yet ?
Paul R
Hi, sorry for long time no answer. I have built MCU controlled car, well, maybe it could be defined as dumb robot. And I just need to solve car-to PC data transfer. But I am on the good way now, I have sucesfully managed to communicate via USB using V-USB (software emulated USB for Atmel MCUs.)
B.Gen.Jack.O.Neill