Correct way to wire USB 2.0 Type C connector

pulldownpullupusbusb-c

I'm playing around with building a simple keyboard, that will have just few buttons, nothing complex.

I have decided to use USB 2.0 Type C connector, like this or this.

Now when following USB 3.0 specs, it says we should use pull down resistors on CC1 and CC2 so that host can tell if device is on or not and also resolve orientation.

But USB 2.0 specs says we should use pull up resistors on D+ or D- lines and that without them host would not recognize device.

I'm confused what to do here since I have both CC1 and CC2 but also D+ and D-.

Should I follow USB 3.0 specs and pull down only CC1 and CC2 lines like this:

enter image description here

Or should I also pull D- up to 5V like this, while pulling CC1 and CC2 to the ground like this:

enter image description here

I would be thankful to someone who could explain how to use these 2.0 Type C connectors and point me to some specification I could read. And explain why use pullup on D- when I already pulled CC1 and CC1 down to ground? Or can I just ignore CC1 and CC2 lines and just use pullup on D- line if it's USB 2.0?

Edit:
MCU I'm using does not have internal pullup or pulldown resistors.
Pull up on D- should go through 1.5k resistor, I missed that one.

Best Answer

You want a Type C so connect the CC pins as per Type C as they don't exist in USB 2.

The rest must be done according to USB 2.

If you want to read more about it then the read the USB specs, they have everything you need.

You have also shorted D- directly to 5V, that will damage your PC and your device, don't do that. Besides the pull-up resistor would not be connected to 5V to begin with, but to 3.3V.

Depending on which USB chip you are going to use, the pull-up might be internal, so without knowing what is connected to your connctor, there is no way to answer if you should have a pull-up or not.

Related Topic