Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

USB programming

Tags:

I want to program a microcontroller (AVR) to control some leds through USB. It's just out of interest in how to build and program USB devices. There are some AVR microcontrollers that support the USB protocol or I could implement the USB protocol in an another microcontroller myself, but I wonder what to use to write your own drivers on the computer.

My level in system programming: total noob (hence the question)

So what is the literature you people would advice to get good knowledge of the USB technology and how to write your own drivers and beyond?

P.S.: I know:

  • C (probably will need it here)

  • Java (probably won't need it here)

  • Python (hope can use it here)

  • assembler (hopefully won't need it here XD).

  • ...

P.P.S: driver development differs for different OS's. I use Linux and Windows, so any material related to one or both of these systems is welcome.

like image 858
EDWH Avatar asked Nov 22 '10 00:11

EDWH


People also ask

Can you program a USB?

Programming USB Devices. Having seen how to deal with different types of endpoints, we can develop a programming model for software-based USB devices. It is helpful to keep in mind how USB operates: There are one or more endpoints, for one or more interfaces, where traffic may arrive or depart at any time.

How does USB software work?

A USB client driver is the software installed on the computer that communicates with the hardware to make the device function. If the device belongs to a device class supported by Microsoft, Windows loads one of the Microsoft-provided USB drivers (in-box class drivers) for the device.


1 Answers

Well, although you can develop and write your own USB driver, the beauty of USB is that you don't need to write your own driver. the USB Implementers Forum has defined class specifications for all the standard device classes. If you can make your device fit into a standard device class the driver has already been written for you!

If you truly want to become familiar with USB development, you should start by reviewing the USB approved class specification documents.

like image 85
J Edward Ellis Avatar answered Mar 05 '23 00:03

J Edward Ellis