USB programming

EDWH picture EDWH · Nov 22, 2010 · Viewed 19.3k times · Source

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.

Answer

J Edward Ellis picture J Edward Ellis · Nov 23, 2010

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.