USB-C: Introduction For Hackers | Hackaday


We’ve now had at least five years of USB-C ports in our devices. It’s a standard that many manufacturers and hackers can get behind. Initially, there was plenty of confusion about what we’d actually encounter out there, and manufacturer-induced aberrations have put some people off. However, USB-C is here to stay, and I’d like to show you how USB-C actually gets used out there, what you can expect out of it as a power user, and what you can get out of it as a hobbyist.

Modern devices have a set of common needs – they need a power input, or a power output, sometimes both, typically a USB2 connection, and often some higher-speed connectivity like a display output/input or USB 3. USB-C is an interface that aims to be able to take care of all of those. Everything aforementioned is optional, which is a blessing and a curse, but you can quickly learn to distinguish what to expect out of a device based on how it looks; if ever in doubt, I’d like to show you how to check.

Communicating Capabilities, Configurations and Caveats

We all know that USB-C can be rotated – it lets you insert the cable whichever way around — which was a significant improvement over USB-B. Let’s get down to how this works. To make this possible, there’s a CC (Configuration Channel) connection – a single-wire line in every USB-C cable that attaches to one of the two CC pins in the Type-C connector, and it is essential to making USB-C work. For simple USB-C usecases, like “get USB 2.0 and 5 V out of a port, follow a simple recipe – attach a 5.1 kΩ pulldown to each CC pin, and you will have a USB-C port that will work with all reasonable devices out there.

There’s support for stuff beyond 5 V and USB 2.0 in USB-C, of course. You can get a variety of voltages out of a USB-C port, which is quite handy for charging things like laptops. You can get USB 3, DisplayPort, and Thunderbolt. Most laptops will let you connect a docking station taking advantage of USB-C as much as possible, giving you a high-resolution display, plenty of USB ports and charging all over the same cable. Now, how does that work?

For usecases like voltages larger than 5 V (USB-PD) or high-speed connectivity…

Source…