Type-C USB: CC Bus and BMC

If you’re not an engineer, quit reading. This is really technical and will bore you to death. If you are an engineer wondering about thing new Type-C technology then here’s an interesting factoid. In every Type-C connection you have an upstream port (the PC), cable, and downstream port (the device).  Those are not exactly correct terms per the Type-C spec, but they will do for now. The two ports and cable all have a port controller which must communicate with each other for Type-C to work. This happens over the Configuration Channel (CC) bus. There are actually two CC bus wires in a Type-C cable, but since the cable is reversible, only one of them is used at a time. Data is transmitted over this one wire bus in a peculiar format called Biphase Mark Coding (BMC). I once failed miserably explaining how the encoding takes place with a customer, so I’ll make it up by explaining it to you.

Look at the diagram above. Clock is on the top, un-encoded data in the middle and biphase mark coded data on the bottom. One cycle of the clock going from high to low is a User Interval, or UI. In any given UI, an input zero is encoded to BMC as data changing state from the previous and staying there for an entire UI. A one is encoded as data changing state from the previous, staying there for 1/2 UI and returning to the previous state. Look at the timing diagram and use this algorithm. If you’re looking at the thumbnail, data starts as 0 0 1 1 0 1 0.  The full picture is actually 1 0 0 1 1 01 0 1 0. Can you see how these data streams translate to BMC coded output?

Last question might be “Why would anyone need to encode data like this?”. If you look closely at the BMC waveform it has no DC content. There is an equal amount of energy above and below zero. This allows it to pass easily through capacitive coupled channels. In addition, BMC guarantees a clock transition at least every UI. This makes it very easy to lock onto and decode. As a matter of fact, you don’t need a PLL to decode BMC at all. This was the key to my BMC decoder. It used simple logic gates and clever timing.