How does the USB interface communicate?

There is neither a handshake signal nor a clock signal in the USB interface. How does it communicate?

We already know that traditional serial and parallel ports communicate through handshake signals, which usually communicate with the host and peripherals via handshake signals. We also know that the two sides of the communication can communicate in either synchronous or asynchronous mode. The biggest difference between the two is that there is a clock signal line in the synchronous communication interface.

The USB interface is widely used. However, there is neither a handshake signal nor a clock signal in the USB interface. How does it establish a connection between the host and the peripheral? How is the exchange of data? In order to understand the communication process of the USB interface in depth, first introduce the hardware and software structure of the USB.

From the physical structure, the USB system is a star structure. The USB system consists of three types of hardware devices: USB host (USB HOST), USB device (USB DEVICE), and USB hub (USB HUB). The physical connection on the USB bus is a layered star topology. In the center of each star topology is a HUB hub. Between the host and the HUB, between the HUB and the HUB, the HUB and the device are point-to-point connections. .

Figure 5 USB topology

Figure 5 USB topology

USB HOST manages the USB system, generates one frame of data per millisecond, sends configuration requests to configure, manage, and recover errors on the USB device. The USB HUB is used for device expansion connections, and all USB DEVICEs are connected to the USB HUB port. The USB DEVICE receives all the data packets on the USB bus, and judges whether the data packet is sent to itself through the address field of the data packet: if the address does not match, simply discard the data packet; if the address matches, respond to the USB HOST The data packet is transmitted with the USB HOST.

From the logical structure point of view, each USB logic device directly transfers data with the USB HOST. Unlike the traditional interface, which implements the handshake by hardware, the USB interface uses the "soft handshake" method.

USB's soft handshake mechanism is implemented through three levels of drivers. The key to this is the device driver, which establishes at least one pipe between the host and the device. There are two types of pipes: flow pipes and message pipes. One of the most important message pipelines is the "default control pipeline", which exists when the device is powered up. It provides information such as the configuration and status of the device. The communication between the host and the device is achieved through the message pipeline.

Figure 6 USB software structure

Figure 6 USB software structure

The main purpose of the stack driver is to connect the device to the appropriate device driver. Because USB supports a lot of devices, each specific device has its own corresponding device driver. For a specific device, which driver to use for management, the protocol stack driver selects by reading the device descriptor. After selecting the driver, the stack driver also assigns an address to the USB device.

After the pipeline is established, the data transfer control is completed by the USB interface driver. Here, the host has absolute dominance, and the device can only be "listen to the command." When an event occurs, the device reports to the host through the message pipeline. The host waits for a command to send a command to the device, open a flow pipe, and send or receive a data packet. The host and the device transmit in the form of data packets, which is obviously the same as the data transmission on the network, and is an asynchronous data transmission mode.

Source: Afan's blog, EDNC BLOG

Led Strip Light

In LEDER,There are flexible LED strip lighting products,which enable you to light or highlight wherever you want and provide innovative and high-quality strip lighting solutions. LED Strip Light is a good summary of LEDER's range, which offers dozens of variations to choose from.LEDER has various profiles or aluminum casings, which are suitable for LED Strip lights, LEDER provides a series of durable LED Light belts with high performance drive capability. Our LED lights in different color temperature range with adjustable light options, has the following features:

l A choice of indoor or outdoor options.

l Flexibility with quality double sided tape for mounting on curved surfaces.

l Full range of colour temperatures – warm 3000K, neutral 4000K & cool 6000K

l Choice of 5m kits with driver or specific cut lengths you can match to a suitable RGB driver and remote control

There is also an RGB color band with controllable strength, 15 colours and a choice of either static colour or a range of dynamic colour changes.

RGB colour changing/static in 15 colours with remote control

LED Strip Light

LED Tape Light,Outdoor LED Strip Lights ,LED Light Strips For Room,Waterproof LED Strip Lights

JIANGMEN LEDERLIGHT LIGHTING Co.,LTD , https://www.wallwasherlights.com