# Let´s use USB!

Some microcontrollers, such as the AT90USB1287 used here, have a built-in USB interface, with the help of which the microcontroller can function as a USB device or as a USB host. This enables the user to to connect the microcontroller with a computer or a USB stick.

I´ll give you a short overview of how a USB 2.0 stack is built and how you can implement your own USB stack on an AT90USB1287 microcontroller. Due to the complexity of the USB, I will split the tutorial into several parts and discuss a specific section of the USB stack in each part.

{% content-ref url="lets-use-usb/a-brief-introduction-to-the-usb-protocol" %}
[a-brief-introduction-to-the-usb-protocol](https://kampi.gitbook.io/avr/lets-use-usb/a-brief-introduction-to-the-usb-protocol)
{% endcontent-ref %}

{% content-ref url="lets-use-usb/initialize-the-usb-as-a-usb-device" %}
[initialize-the-usb-as-a-usb-device](https://kampi.gitbook.io/avr/lets-use-usb/initialize-the-usb-as-a-usb-device)
{% endcontent-ref %}

{% content-ref url="lets-use-usb/initialize-the-control-endpoint" %}
[initialize-the-control-endpoint](https://kampi.gitbook.io/avr/lets-use-usb/initialize-the-control-endpoint)
{% endcontent-ref %}

{% content-ref url="lets-use-usb/now-we-need-some-descriptor" %}
[now-we-need-some-descriptor](https://kampi.gitbook.io/avr/lets-use-usb/now-we-need-some-descriptor)
{% endcontent-ref %}

{% content-ref url="lets-use-usb/passing-the-first-enumeration" %}
[passing-the-first-enumeration](https://kampi.gitbook.io/avr/lets-use-usb/passing-the-first-enumeration)
{% endcontent-ref %}

{% content-ref url="lets-use-usb/create-the-device-driver" %}
[create-the-device-driver](https://kampi.gitbook.io/avr/lets-use-usb/create-the-device-driver)
{% endcontent-ref %}

Please check out my GitLay repository for the complete project.

{% embed url="<https://gitlab.com/Kampi/avr/tree/master/examples/Tutorial/AVR8/AT90/USB_Example>" %}
