The USB protocol, explained

If you can explain what a USB PID, J state, K state, and SOF are, you can probably stop reading now. But if you don't know or want a refresher, you can spend 15 minutes watching [Sine Lab's] simple explanation of USB protocol details. You can find the video below.

The motivation for this is that he wants to add USB to his projects using an ATMega with a hardware USB implementation. Honestly, most of the time you'll just consume a pre-made library and run it that way. However, understanding the terminology can help, especially if things don't go as planned.

Of course, another useful method is to simply use a predefined USB "serial port" and treat the whole thing as an old fashioned serial port. But for some things you want to take advantage of the speed and capabilities of the USB specification.

The last few minutes of the video switch to a practical example. We agree with the decision to use a library, and in this case he is using LUFA, an open source USB stack for the processor he wants to use. But understanding the actual protocol will help you understand the documentation and troubleshoot. The example uses an HID device, which is even more of a protocol that you'll need to read about separately.

If you want to learn more about USB-C, [Arya Voronova] is here for you. The USB CDC profile can support multiple serial ports, but if you prefer to abuse a single serial port to get multiple virtual ports, that's also possible.

The USB protocol, explained

If you can explain what a USB PID, J state, K state, and SOF are, you can probably stop reading now. But if you don't know or want a refresher, you can spend 15 minutes watching [Sine Lab's] simple explanation of USB protocol details. You can find the video below.

The motivation for this is that he wants to add USB to his projects using an ATMega with a hardware USB implementation. Honestly, most of the time you'll just consume a pre-made library and run it that way. However, understanding the terminology can help, especially if things don't go as planned.

Of course, another useful method is to simply use a predefined USB "serial port" and treat the whole thing as an old fashioned serial port. But for some things you want to take advantage of the speed and capabilities of the USB specification.

The last few minutes of the video switch to a practical example. We agree with the decision to use a library, and in this case he is using LUFA, an open source USB stack for the processor he wants to use. But understanding the actual protocol will help you understand the documentation and troubleshoot. The example uses an HID device, which is even more of a protocol that you'll need to read about separately.

If you want to learn more about USB-C, [Arya Voronova] is here for you. The USB CDC profile can support multiple serial ports, but if you prefer to abuse a single serial port to get multiple virtual ports, that's also possible.

What's Your Reaction?

like

dislike

love

funny

angry

sad

wow