This is a creation in Article, where the information may have evolved or changed. ID ( Identification ) role Identification pin
two x USB when the device interconnects, how to make two devices know: Who is the master control? Who is peripheral"periphery"? This actually uses the new PIN, which is appended with the fifth pin in the traditional 4-pin USB interface:ID
to be the master of mutual vaccinationUSBdevice, it willIDpin-bit grounding (GND),The relative wants to act as a controlled person.USBThe device then empties the PIN (NC), to be described with more specific electrical characteristics, the grounding person'sIDline resistance must be less thanTenOhm, the opposite of the air connection will greatly pull high resistance, need to exceed100kOhm.
Illustrated: USB OTG through the new ID pin grounding, floating state to determine the master-slave role in interconnection.
The USB OTG standard, which is fully compatible with the USB2.0 standard, adds power management (power saving) functionality that allows the device to be both a host and a peripheral operation (dual-use OTG). OTG devices are fully compliant with the USB2.0 standard and provide a host of detection capabilities that support the Host Orders Protocol (HNP) and the dialog request Protocol (SRP). In OTG, the initial host device is called a device, and the peripheral is called a B device. The initial role can be determined by how the cable is connected. Figure 1 shows that the default host is determined with the 5th ID pin, and the dual-use device uses the new mini-ab receptacle, which adds a fifth pin (ID) to the mini-a plug, mini-b plug, and mini-ab socket to identify different cable ends. The ID pin in the MINI-A plug is grounded, and the ID pin in the mini-b plug is floating empty. When an OTG device detects a grounded ID pin, it means a device (host) is the default, and the device that detects the ID pin floating is considered a B device (peripheral). Once the system is connected, OTG's role can also be replaced. The host and peripherals use the new Hnp,a device as the default host and provide Vbus power, and reset the bus, enumerate and configure B devices when a device connection is detected. The second new protocol that OTG standard adds to USB is called the dialog Request Protocol (SRP). The SRP allows device B to request a device to turn on vbus power and initiate a conversation. An OTG conversation can be determined by the time a device provides Vbus power (note: A device is always powering vbus, even as a peripheral). You can also turn off the Vbus power supply through a device to end a session to conserve power, which is important in battery-powered products. For example, when two cellular phones exchange information with each other, one is connected to the mini-a side of the charge, which is a device, and the default is the host. The other is a B device, which defaults to peripherals. When USB communication is not required, a device can turn off the Vbus line, at which point the B device detects the state and enters a low-power mode.