Type-C USB .. One Connector To Rule Them All
I have been doing a LOT of Type-C USB design lately. In fact, it’s consuming my whole freaking daily existence for the most part. I have literally spent 60 hours in customer labs over a single week working on this stuff. “What’s the big deal?” you might ask. Well, you don’t know it yet but Type-C USB is going to change your world too. Major companies who supply your phones, computers, laptops, tablets, printers and such are redesigning their products with Type-C USB. Why? It enables a whole new level of sexy in consumer devices. Type-C is the Holy Grail for industrial designers. It allows thin and light form factors, while providing blazing fast I/O capability. It gives you data, video and power in one tiny reversible connector. So why can’t you buy it in everything yet? Because we’re still working on it! This stuff is hard! (more on that later) It’s taking some very dedicated work by a thousands of engineers around the world to make Type-C a reality for consumers.
Type-C USB Port Controllers
We wouldn’t have Type-C USB without semiconductor devices doing all the work you never see. My company Cypress Semiconductor makes one of the world’s first Type-C semiconductors called “CCG1“. This chip sits behind the Type-C port and communicates with whatever device you plug-in. It talks to the cable (which also has a chip) and downstream device, determining what the capabilities of each are and reporting this to the PC. High speed data does not flow though the chip, but initiating a Type-C connection is impossible without this “port controller” function. CCG1 can also be used in the cables or downstream devices previously mentioned. As a side note, I helped invent the CC bus physical layer (“PHY”) which CCG1 uses to communicate with other devices in the Type-C ecosystem. It communicates via Biphase Mark Encoding over a single wire. Very cool actually. I’ll explain how this works in another post.
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.