Author Topic: USB-C to Micro USB, what do I do for the CC pins?  (Read 6988 times)

0 Members and 1 Guest are viewing this topic.

Offline Hootis TigglebitsTopic starter

  • Contributor
  • Posts: 37
  • Country: us
USB-C to Micro USB, what do I do for the CC pins?
« on: December 14, 2023, 04:23:13 pm »
I have a USB-C breakout board that I'm connecting a micro-USB cable to so I only need Vbus, GND, D+ and D-, CC1 and CC2 are both shorted to ground using 5.1K resistors.  I'm finding conflicting information as to what value these resistors should be for this application when using a 5V 2.5A power supply.  Could someone assist me?  Below is the schematics of the board.
 

Offline coromonadalix

  • Super Contributor
  • ***
  • Posts: 6693
  • Country: ca
Re: USB-C to Micro USB, what do I do for the CC pins?
« Reply #1 on: December 14, 2023, 06:37:09 pm »
a simple search
https://www.allaboutcircuits.com/technical-articles/introduction-to-usb-type-c-which-pins-power-delivery-data-transfer/

The CC1 and CC2 Pins

These pins are the Channel Configuration pins. They perform a number of functions such as cable attachment and removal detection, receptacle/plug orientation detection, and current advertisement. These pins could be also used for the communications required by the Power Delivery and Alternate Mode.

Figure 4 below shows how the CC1 and CC2 pins reveal the receptacle/plug orientation. In this figure, DFP stands for Downstream Facing Port which is the port acting as either the host in data transmission or the source for power. UFP denotes Upstream Facing Port which is the device connected to the host or the power consumer.
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6289
  • Country: 00
Re: USB-C to Micro USB, what do I do for the CC pins?
« Reply #2 on: December 15, 2023, 01:42:19 pm »
You don’t need to do anything with cc1 and cc2. Here is a similar circuit that works. 5.1k is the popular value.

https://github.com/zapta/ble_stepper_motor_analyzer/blob/main/kicad/stepper_monitor.pdf
 

Online peter-h

  • Super Contributor
  • ***
  • Posts: 4132
  • Country: gb
  • Doing electronics since the 1960s...
Re: USB-C to Micro USB, what do I do for the CC pins?
« Reply #3 on: December 15, 2023, 04:12:23 pm »
Is the client current requirement negotiation done the same way with USB-C?

I guess it must be since the most common cable ends with this

Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6289
  • Country: 00
Re: USB-C to Micro USB, what do I do for the CC pins?
« Reply #4 on: December 15, 2023, 05:31:26 pm »
My understanding is that with USB-C, the 'real' voltage/current negotiation is done via a digital protocol and that these two resistors scheme is just a low cost backward compatibility for the the old 4-wires, 5V arrangement.
 

Online bson

  • Supporter
  • ****
  • Posts: 2462
  • Country: us
Re: USB-C to Micro USB, what do I do for the CC pins?
« Reply #5 on: December 15, 2023, 06:27:31 pm »
USB C is a connector and cable.  You can use it with USB 1.1 FS is you're so inclined; it'll work just fine. (In fact, I'd recommend sticking to C connectors when possible.)

USB 3 is a standard that includes USB A, B, and C connectors, their interoperability and backwards compatibility with equipment that implements previous versions of USB.

USB PD relies entirely on the USB CC pins for negotiation and doesn't use the D pairs.  It requires USB 3 on both ends, relying solely on the USB C CC pins either using protocol based negotiation or resistors, or both.

USB A and B can't support USB PD, but cables and your little adapter can internally terminate the CC pins in resistors, or implement USB PD on behalf of a device.  Possibly on behalf of a host (with a suitable power supply, though this might be sketchy).  This is easy since only the CC pins are used.

If you have a USB C connector you SHOULD terminate the CC pins properly so the other end can sense orientation.  This means on the upstream (host facing) port the CC pins should be pulled down (device impersonation), on the downstream (device facing) port pulled up (host impersonation).  This in turn means your adapter is going to be directional, with a host-facing side and a device-facing side.  Since USB A port/cable connectors are different this is probably already the case.
« Last Edit: December 15, 2023, 06:33:01 pm by bson »
 
The following users thanked this post: Hootis Tigglebits

Online ejeffrey

  • Super Contributor
  • ***
  • Posts: 3922
  • Country: us
Re: USB-C to Micro USB, what do I do for the CC pins?
« Reply #6 on: December 15, 2023, 08:57:47 pm »
My understanding is that with USB-C, the 'real' voltage/current negotiation is done via a digital protocol and that these two resistors scheme is just a low cost backward compatibility for the the old 4-wires, 5V arrangement.

Not really.  Yes, USB-PD is done with active digital communication, but the resistor negotiation is the default, mandatory, and all that most USB-data ports and relatively low powered USB devices use.  PD is mostly used for cell phone and laptop chargers, and with docking stations.  It is designed so that functional USB-A to C cables can be made, but it is also heavily used in pure USB-C connections.

They are both superior to the old way used by the original USB standard of requiring device enumeration because power negotiation can be done before and independently of device enumeration, and superior to the USB-BC hack that uses the D+/D- pins for signalling because it doesn't prevent use as a data port.
 

Online peter-h

  • Super Contributor
  • ***
  • Posts: 4132
  • Country: gb
  • Doing electronics since the 1960s...
Re: USB-C to Micro USB, what do I do for the CC pins?
« Reply #7 on: December 15, 2023, 09:39:52 pm »
Quote
They are both superior to the old way used by the original USB standard of requiring device enumeration because power negotiation can be done before and independently of device enumeration

Do you mean that client device register where you specify the max current required in 2mA steps?

I have that implemented (we had a thread on it recently) in my project, where it is set to 90mA, but AFAICT every USB Host ignores this.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline Hootis TigglebitsTopic starter

  • Contributor
  • Posts: 37
  • Country: us
Re: USB-C to Micro USB, what do I do for the CC pins?
« Reply #8 on: December 18, 2023, 05:05:48 pm »
USB C is a connector and cable.  You can use it with USB 1.1 FS is you're so inclined; it'll work just fine. (In fact, I'd recommend sticking to C connectors when possible.)

USB 3 is a standard that includes USB A, B, and C connectors, their interoperability and backwards compatibility with equipment that implements previous versions of USB.

USB PD relies entirely on the USB CC pins for negotiation and doesn't use the D pairs.  It requires USB 3 on both ends, relying solely on the USB C CC pins either using protocol based negotiation or resistors, or both.

USB A and B can't support USB PD, but cables and your little adapter can internally terminate the CC pins in resistors, or implement USB PD on behalf of a device.  Possibly on behalf of a host (with a suitable power supply, though this might be sketchy).  This is easy since only the CC pins are used.

If you have a USB C connector you SHOULD terminate the CC pins properly so the other end can sense orientation.  This means on the upstream (host facing) port the CC pins should be pulled down (device impersonation), on the downstream (device facing) port pulled up (host impersonation).  This in turn means your adapter is going to be directional, with a host-facing side and a device-facing side.  Since USB A port/cable connectors are different this is probably already the case.
Thank you, so in my case I need to use two 10-100k resistors for the CC pins and connect both to ground?  Here's the schematic again, but with a little more information:


You don’t need to do anything with cc1 and cc2. Here is a similar circuit that works. 5.1k is the popular value.

https://github.com/zapta/ble_stepper_motor_analyzer/blob/main/kicad/stepper_monitor.pdf
But if I leave the 5.1K resistors in place as shown in the schematic then when connect a USB-C to USB-A cable to connect to a PC I get a pop-up error that says USB device not recognized and the following error in Device Manager:
Windows has stopped this device because it has reported problems. (Code 43)

A request for the USB device descriptor failed.
« Last Edit: December 18, 2023, 07:40:13 pm by Hootis Tigglebits »
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6289
  • Country: 00
Re: USB-C to Micro USB, what do I do for the CC pins?
« Reply #9 on: December 19, 2023, 03:39:59 am »
But if I leave the 5.1K resistors in place as shown in the schematic then when connect a USB-C to USB-A cable to connect to a PC I get a pop-up error that says USB device not recognized and the following error in Device Manager:
Windows has stopped this device because it has reported problems. (Code 43)

A request for the USB device descriptor failed.

Did you try your design with an old (non type C connector first)?  It's possible that there are other issues with that design. Once I works with a mini or micro connectors, I believe it will also work with Type C and the CC resistors.

The backward compatibility with two 5.1K CC resistors to ground is a pretty common solution. You can see for example this USB type C to 4 wires adapter. https://www.pololu.com/product/2585
« Last Edit: December 19, 2023, 03:44:38 am by zapta »
 

Offline Hootis TigglebitsTopic starter

  • Contributor
  • Posts: 37
  • Country: us
Re: USB-C to Micro USB, what do I do for the CC pins?
« Reply #10 on: December 19, 2023, 04:37:15 pm »
I did and it works fine using a 2.0 USB-A to micro usb cable.  The board came with two 5.1k resistors connected to each cc pin and the other side to ground and I was still getting the same error message. :-//
 

Online uer166

  • Frequent Contributor
  • **
  • Posts: 998
  • Country: us
Re: USB-C to Micro USB, what do I do for the CC pins?
« Reply #11 on: December 19, 2023, 11:54:43 pm »
Did you try different USB c cables?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf