Introduction to USB interfaces

Mondo Digital Updated on 2024-01-19

As the most powerful interface at present, USB supports many peripherals, such as keyboard and mouse. It is also possible to convert a variety of buses, such as:USB to Ethernet port, USB to CAN portWait, in this article, let's learn Xi about the USB interface.

Different USB versions of the device, the data transfer speed will also be different, how to distinguish between the two devices high-speed, full-speed and low-speed USB recognition?In order to facilitate everyone's understanding, let's only talk about logic and facts about the results, and some specific numerical calculations have been thoughtfully saved for you.

First of all, full speed and low speed are well distinguished: because on the device side there is a 15k pull-up resistor, when the device is plugged into the controller or powered on, the data line with the pull-up resistor will be pulled up, and the controller will judge whether it is a full-speed device or a low-speed device according to the level on d+ d-. There is 1. on the D+ side of the full-speed device5K pull-up resistor, 1 on the D-side of low-speed devices5k pull-up resistor.

Let's take a lookHow to distinguish between a high-speed device and a full-speed device:The high-speed device initially appears as a full-speed device, that is, like the full-speed device, there is a 1. on the D+ line5k pull-up resistor. usb2.The 0 controller treats it as a full-speed device, and then the controller and device confirm each other's identities through a series of handshake signals. For example, a high-speed controller needs to detect whether the connected device is high-speed, full-speed or low-speed, and the high-speed device needs to detect that the connected controller is USB20 is still 10, if it is the former, it will perform a series of actions to switch to high-speed mode to work, and if it is the latter, it will work at full speed mode.

When the controller detects that a device is plugged in and powered on, it notifies the host, which sends a request for the controller to reset the newly plugged device. The device reset operation is that the controller drives the data line to the reset state SE0 (i.e., D+ and D- are all low).

When the high-speed device sees the reset signal, it passes through the internal current source to the D-lineContinuously pour a small currentPlus the internal equivalent impedance is approximately 45r, so an approximate can be seen on the control side800mVAnd that's itchirp k signal(Initiated by Device).

On the controller side, although the reset signal is issued and SE0 is always driven, the USB2 on the controller side is still drivenThe high-speed receiver of 0 has been detecting the chirpk signal initiated by the device, and if no chirpk signal is seen, it will continue to reset until the reset is complete, and then operate in full speed mode. If only a full-speed controller,If high-speed operation is not supported, the controller ignores the chirpk signal sent by the device, after which the device will not switch to high-speed mode.

After the chirp k signal sent by the device ends, the controller must start replying with a series of kjkjkj....sequence, indicating to the device that this is a USB20 controllers. The KJ sequence stops and then ends the reset operation. The controller sends the Chirp KJ sequence in the same way as the device, by alternately pouring a small current into the differential data line through a current source.

Going back to the device, after the device detects the chirp signal from the controller, it must switch to high-speed mode within 500us. The amplitude of the chirp kj sequence sent by the controller is reduced to half of the original sizeis 400mV。This is because a new termination resistor is mounted on the device side, and the equivalent impedance is 225r, exactlybefore impedanceof half。In the future, the signal amplitude for high-speed operation will be 400mV, not 800mV at full speed and low speed.

At this point, high-speed devices are compatible with USB20 controller handshake is completed, and the follow-up 480Mbps high-speed signal communication is carried out, which is what we often call the USB handshake protocol, and the USB interface is introduced here, hoping to help the little partners in front of the screen.

Related Pages