Overview of OTG detection principle implemented by master-slave function of OTG interface device

Used by OTG. Detect the status of the ID pin to determine whether it is the master device or the slave device.

OTG Interface Device Master-Slave Function Implementation OTG Detection Principle Overview

OTG Interface Device Master-Slave Function Implementation OTG Detection Principle Overview

The principle of OTG detection is:

The USB OTG standard adds a power management (power saving) function based on full compatibility with the USB 2.0 standard, allowing the device to operate as both a host and a peripheral (dual-purpose OTG). USB OTG technology enables data transfer between devices and devices without a host. For example, a digital camera can be directly connected to a printer and print photos, and data can be transmitted directly between the mobile phone and the mobile phone, thereby expanding the application range of the USB technology. In OTG, the initial host device is called A device and the peripheral device is called B device. In other words, the mobile phone can be both a peripheral device and a host computer to transmit data. The initial role can be determined by the connection mode of the cable (determined by the status of the ID line).

There are 5 lines in the USB OTG interface: 2 are used to transmit data (D+, D-); 1 is a power line (VBUS); 1 is a ground line (GND), and 1 is an ID line. ID line - used to identify different cable ends, the ID pin in the mini-A plug (ie, A Peripheral) is grounded, and the ID pin in the mini-B plug (ie, B Peripheral) is left floating. When the OTG device detects the grounded ID pin, it indicates that the default is A device (host), and the device that detects ID pin floating is considered to be B device (peripheral). The MICROUSB of the mobile phone is the OTG interface. When we connect the mobile phone to the computer, the ID pin through the line is shorted to GND at this time. The mobile phone is the main device. VCC can supply the external 5V. If the OTG interface ID is vacant, this master device is a slave. The device cannot read USB disks, etc. When we debug ADB, we must ground the OTG ID pin and debug it through ADB. If the computer identified by the ungrounded computer is only a memory, it cannot communicate through ADB. USB HOST and OTG are two kinds of interface hardware. The ID of the OTG pin can be used as the function of HOST and can also be used as ADB debugging. The general USB HOST cannot support ADB debugging.

Bulk Cable

CIXI LANGUANG PHOTOELECTRIC TECHNOLOGY CO..LTD , https://www.cxblueray.com