USB interface circuit, interface circuit board and electronic equipment
By designing a USB interface circuit that includes a processor module, a power control switch module, and a master-slave identification module, the master and slave device roles can be automatically identified, solving the problem of the Type-C interface being unable to automatically identify the device and improving data exchange efficiency.
Patent Information
- Application Number
- CN202310066271.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-29
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2043-01-29
AI Technical Summary
In the prior art, electronic devices with USB Type-C interfaces cannot automatically identify the roles of master and slave devices, resulting in low data exchange efficiency and inability to adapt to the USB Type-C interface.
A USB interface circuit is designed, which includes a processor module, a power control switch module and a master-slave identification module. By detecting the level changes of the configuration channel pins of the Type-C interface, it automatically completes the master and slave device identification and switches the power source to determine the device role.
It realizes automatic master-slave device identification of USB Type-C interface, improves data exchange efficiency, adapts to Type-C interface, and supports data exchange between devices.
Smart Images

Figure CN116089333B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of data transmission technology, and in particular to a USB interface circuit, an interface circuit board, and an electronic device. Background Art
[0002] USB (Universal Serial Bus) is an external bus standard used to regulate the connection and communication between computers and external devices. With the development of USB technology, interfaces based on USB technology have become widely used in computers and embedded devices. USB On-The-Go (OTG), a USB specification, can be used to connect various devices or mobile devices for data exchange, for example, between master and slave devices.
[0003] In related technologies, such as the USB 2.0 standard, Micro-USB receptacles are often used in USB OTG circuits to connect devices. Driven by user preference and the promotion of legislation, USB designs with a unified form factor and standard interface are gradually becoming mainstream. USB Type-C, a form factor standard for USB interfaces used in USB 3.0 and above, is gradually replacing traditional interface designs such as USB Type-A and USB Type-B.
[0004] However, in embedded devices, USB 2.0 and below are still the mainstream standard. For example, USB OTG circuits based on the USB 2.0 standard are still used to connect devices and are the mainstream design solution. Therefore, how to design a USB interface circuit that adapts to the USB Type-C interface and still enables data exchange between devices is a technical problem that needs to be solved by those skilled in the art. Summary of the Invention
[0005] The embodiments of the present application provide a USB interface circuit, an interface circuit board, and an electronic device, which are adapted to a USB Type-C interface and can automatically identify master and slave devices and complete data exchange.
[0006] In a first aspect, an embodiment of the present application provides a USB interface circuit, which includes a processor module, a power control switch module, a Type-C interface and a master-slave identification module.
[0007] The processor module includes an identification terminal for identifying master and slave devices; the indication terminal of the power control switch module is connected to the overcurrent protection terminal of the processor module, and the power control switch module also includes an enable terminal, which is used to control the output of the power control switch module; the Type-C interface is provided with a configuration channel pin, and the Type-C interface is connected to an external device through an external data line; the detection terminal of the master-slave identification module is connected to the configuration channel pin, the first output terminal of the master-slave identification module is connected to the identification terminal, and the second output terminal of the master-slave identification module is connected to the enable terminal.
[0008] In a second aspect, an embodiment of the present application provides an interface circuit board, which includes the USB interface circuit as described in the above embodiment.
[0009] In a third aspect, an embodiment of the present application provides an electronic device, which includes the interface circuit board as described in the above embodiment.
[0010] This application can detect the level changes of the configuration channel pins of the Type-C interface through the master-slave identification module on the USB interface circuit, and switch the power source according to the detection results, so that the processor module can complete the master-slave device identification and determine the role of the local device in data exchange, which facilitates data exchange between devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 A block diagram of the USB interface circuit provided in an embodiment of the present application;
[0012] Figure 2 A circuit diagram of a first detection unit provided in one embodiment of the present application;
[0013] Figure 3 A circuit diagram of a second detection unit provided in one embodiment of the present application;
[0014] Figure 4 A circuit diagram of a USB interface circuit provided in accordance with an embodiment of the present application. DETAILED DESCRIPTION
[0015] The present application will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the examples described herein are intended to explain the present application, not to limit it. It should also be noted that, for ease of description, the accompanying drawings only illustrate portions relevant to the present application, not all structures.
[0016] It should be noted that due to space limitations, this application specification does not enumerate all optional implementation methods. After reading this application specification, those skilled in the art should be able to understand that as long as the technical features do not contradict each other, any combination of technical features can constitute an optional implementation method.
[0017] It should be noted that, in this document, relational terms such as "first" and "second" are used solely to distinguish one entity, operation, or object from another, and do not necessarily require or imply the existence of any actual relationship or order between these entities, operations, or objects. Furthermore, there is no limit on the number of objects distinguished by "first," "second," etc.; they can be one or more. It is conceivable that, in the description of this application, "more than one" means two or more.
[0018] Data exchange is usually required between electronic devices, and the data transmission method can be network transmission or external data line transmission, such as USB line or OTG line. In the relevant technology, for USB2.0 and below standards, the ID line is often used to identify the master device and slave device in the OTG application, that is, to identify whether the current electronic device is a master device or a slave device in the data exchange. For example, in a USB OTG circuit using a Micro-USB socket, the first ID pin of the core processor is connected to the second ID pin on the Micro-USB socket, that is, the core processor determines whether the current device is a master device or a slave device through the level on the first ID pin. Specifically, when the core processor detects a low level through the first ID pin, the core processor can determine that the current device is the master device. Although it can realize the master-slave identification of devices, it cannot be adapted to the Type-C interface. Moreover, in the relevant technology, for the USB2.0 OTG circuit using the Type-C seat, although the electronic device using the circuit can adapt to the Type-C interface, when identifying the master and slave devices, the ID pin on it needs to switch the level on the pin by manually plugging and unplugging the jumper cap, that is, the user needs to manually switch, and the circuit cannot achieve automatic identification.
[0019] Therefore, the present application provides a USB interface circuit that can adapt to the Type-C interface and can also perform automatic identification. Figure 1 The principle block diagram of the USB interface circuit provided in the embodiment of the present application is as follows: Figure 1 As shown, the USB interface circuit of the present application includes a processor module 110 , a power control switch module 120 , a Type-C interface 130 and a master-slave identification module 140 .
[0020] The processor module 110 is provided with an identification terminal for master-slave device identification. This means that an electronic device using this USB interface circuit can determine whether it is a master or slave device based on the processor module 110's detection of the identification terminal. The identification terminal is connected to the first output terminal of the master-slave identification module 140 to transmit the output of the master-slave identification module 140 to the processor module.
[0021] The power control switch module 120 can provide the corresponding operating voltage for the processor module 110. Of course, the input terminal of the power control switch module 110 is connected to a power supply (not shown), and the operating voltage is output to the processor module 110 through its output terminal. For example, the input terminal of the power control switch module 120 is connected to the operating voltage provided by a voltage regulator chip, and the output terminal of the power control switch module 120 provides the corresponding operating voltage to the processor module 110. The power control switch module 120 includes an indicator terminal, which is connected to the overcurrent protection terminal of the processor module 110. The processor module 110 can stop supplying the corresponding operating voltage to the processor module 110 through the overcurrent protection terminal to prevent damage to the processor module 110, thereby achieving overcurrent protection.
[0022] In addition, the power control switch module 120 also includes an enable terminal, which is used to control the output of the power control switch module 120, that is, the power control switch module 120 can determine whether to cut off the output to the processor module 110 based on the level change of the enable terminal. The Type-C interface 130 provided on the USB interface circuit can be used to connect external devices through an external data line for data transmission. The Type-C interface 130 includes a configuration channel pin, which is connected to the detection terminal of the master-slave identification module 140. When an external device is connected through different external data lines, a corresponding level change is generated on the configuration channel pin to facilitate the master-slave identification module 140 to detect and output the corresponding identification result to the processor module 110 to complete automatic identification.
[0023] For example, taking an electronic device using the aforementioned USB interface circuit as an example, the electronic device is connected to an external device via an external data cable, and the Type-C interface on the electronic device is connected to one end of the external data cable. When the electronic device functions as a slave device and the external device functions as a master device, the configuration channel pin on the Type-C interface undergoes a level change. The master-slave identification module detects the corresponding level through the detection terminal and transmits the identification result to the processor module through its first output terminal, causing the processor module to determine that the current electronic device is a slave device. It is conceivable that the level change on the configuration channel pin is different depending on whether the external device functions as a master device or a slave device.
[0024] As can be seen from the above scheme, the USB interface circuit is connected to the external data line through the Type-C interface to connect to the external device, thereby realizing adaptation to the Type-C interface; and the master-slave identification module on the USB interface circuit detects the level change of the configuration channel pin of the Type-C interface, and the master-slave identification module feeds back the corresponding detection result to the identification end of the processor module. At the same time, the master-slave identification module can also control the power control switch module according to the level change of the configuration channel pin to complete the switching control of the power supply source, so that the processor module can automatically complete the master-slave device identification and accurately determine whether the local device is the master device or the slave device during the data exchange process, which is conducive to data exchange between devices.
[0025] In some embodiments, the master-slave identification module includes a first detection unit and a second detection unit. One end of the first detection unit is connected to the configuration channel pin, and the other end of the first detection unit is connected to the identification end, that is, one end of the first detection unit serves as the detection end of the master-slave identification module, and the other end of the first detection unit serves as the first output end of the master-slave identification module. The control end of the second detection unit is connected to the other end of the first detection unit. Therefore, the output of the first detection unit also affects the second detection unit, and the first detection unit can be used to control the output of the output end of the second detection unit. The output end of the second detection unit is connected as the second output end of the master-slave identification module, that is, the second detection unit can provide a corresponding control signal to the power control switch module based on the output result of the first detection unit.
[0026] It can be imagined that when the external device acts as the master device and the electronic device acts as the slave device, the electronic device can be powered by the external device. Therefore, when the electronic device determines to act as a slave device for data exchange, the second detection unit of the master-slave identification module controls the power control switch module to stop supplying power to the core processor, so that the USB interface circuit is powered by the external device instead.
[0027] Therefore, when the external device acts as a master device or a slave device, the configuration channel pin can generate different level changes accordingly, so that the master-slave identification module can detect it through the first detection unit thereon and transmit the corresponding identification result to the processor module. At the same time, the master-slave identification module can also control the power control switch module through the second detection unit thereon to complete the switching of the corresponding power supply, so that the USB interface circuit can work normally.
[0028] In some embodiments, the first detection unit includes a first pull-up resistor, a first current-limiting resistor, and a unidirectional conductive device. A first end of the first pull-up resistor is connected to a supply voltage, while a second end of the first pull-up resistor is connected to a first end of the first current-limiting resistor. The second end of the first current-limiting resistor is connected to an identification terminal of the processor module. Thus, in the first detection unit, the first pull-up resistor and the first current-limiting resistor are connected in series.
[0029] Furthermore, a first end of the unidirectional conductive device is connected to the second end of the first pull-up resistor, and a second end of the unidirectional conductive device is connected to the configuration channel pin. It should be noted that when the configuration channel pin is pulled down to ground, the unidirectional conductive device is conductive. That is, the USB interface circuit can change the potential of the first current-limiting resistor based on whether the unidirectional conductive device is conductive, so that the processor module identification terminal detects the corresponding voltage level to determine whether the device is a master device or a slave device.
[0030] For example, Figure 2 This is a circuit diagram of a first detection unit provided in an embodiment of the present application, as shown in FIG. Figure 2 As shown, in one embodiment, the unidirectional conducting device is a common anode diode D1, which has two cathode terminals and one anode terminal. In terms of circuit structure, it is equivalent to two diodes connected to a common anode. Therefore, in some embodiments, two diodes connected to a common anode can also be used to replace the common anode diode.
[0031] The Type-C interface uses two configuration channel pins to detect whether the connected external data line is an OTG cable. When an OTG cable is connected to the Type-C interface of the USB interface circuit, the voltage levels of the two configuration channel pins change. To distinguish these two configuration channel pins, they are distinguished as the first configuration channel pin and the second configuration channel pin.
[0032] Therefore, the two cathode terminals of the common-anode diode D1 are respectively connected to the first configuration channel pin (not shown in the figure) and the second configuration channel pin (not shown in the figure), and the anode terminal of the common-anode diode D1 is connected to the second terminal of the first pull-up resistor R1. The anode terminal of the common-anode diode D1 is also connected to the first terminal of the first current-limiting resistor R2. When the external device functions as a slave device, the USB interface circuit is connected to the external device via the OTG cable, and the first configuration channel pin and the second configuration channel pin are pulled down to ground. The equivalent resistance of the OTG cable acts as a pull-down resistor for the first configuration channel pin and the second configuration channel pin, thereby causing the first configuration channel pin and the second configuration channel pin to be at a low level, thereby turning on the common-anode diode. The identification terminal of the processor module can detect the corresponding level change to determine that the external device functions as a slave device and the local device functions as a master device.
[0033] In some embodiments, the second detection unit includes a second pull-up resistor, a second current limiting resistor and a switching tube, wherein the input end of the switching tube is connected to the working voltage through the second pull-up resistor, the control end of the switching tube is connected to the identification end through the second current limiting resistor, and the output end of the switching tube is grounded.
[0034] It can be understood that the control end of the switching tube is connected to the identification end and is also connected to the output end of the first detection unit. Therefore, in some embodiments, when the first detection unit uses the second end of the first current limiting resistor as the output end, the control end of the switching tube is also connected to the second end of the first current limiting resistor.
[0035] In addition, the second detection unit can select the input end or output end of the switching tube as the output end of the second detection unit to connect the enable end of the power control switch module according to the conduction characteristics of the switching tube, so as to switch the corresponding power supply when the USB interface circuit recognizes that the external device is the master device and the local device is the slave device.
[0036] For example, Figure 3 As shown, Figure 3 This is a circuit diagram of a second detection unit provided in an embodiment of the present application, wherein the switch tube can be an NMOS tube Q1. Therefore, the drain terminal of the NMOS tube Q1 serves as the input terminal of the switch tube, which is connected to the second pull-up resistor R3. The gate terminal of the NMOS tube Q1 serves as the control terminal of the switch tube, which is connected to the second current-limiting resistor R4. The source terminal of the NMOS tube Q1 serves as the output terminal of the switch tube and is grounded. Therefore, according to the conduction characteristics of the NMOS tube, the drain terminal of the NMOS tube in the USB interface circuit can also serve as the output terminal of the second detection unit and be connected to the enable terminal, so that when the NMOS tube Q1 is turned on, the enable terminal is grounded.
[0037] It should be noted that the switch transistor can also be a PMOS transistor. For example, the source terminal of the PMOS transistor serves as the input terminal of the switch transistor and is connected to the operating voltage through a second pull-up resistor. The gate terminal of the PMOS transistor serves as the control terminal of the switch transistor and is connected to the second current-limiting resistor, while the drain terminal of the PMOS transistor serves as the output terminal of the switch transistor and is grounded. The source terminal of the PMOS transistor is connected to the enable terminal, so that when the PMOS transistor is turned on, the enable terminal is grounded.
[0038] In one embodiment, the processor module includes a first power supply terminal, which is used to connect to the operating voltage. When the external device acts as a master device, the power control switch module no longer provides the operating voltage to the first power supply terminal of the processor module, and the external device powers the USB interface circuit. Therefore, the second power supply terminal of the Type-C interface provides the operating voltage to the first power supply terminal of the processor module, that is, the external device can be powered by the second power supply terminal of the Type-C interface. When the external device acts as a slave device, the external device cannot be powered by the second power supply terminal of the Type-C interface, and the power control switch module is turned on, and the output terminal of the power control switch module can provide the operating voltage to the first power supply terminal of the processor module.
[0039] Figure 4A circuit diagram of a USB interface circuit provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, the processor module includes processor U1, and the power control switch module includes control chip U2. Processor U1's first power supply pin, USB_VBUS, serves as the first power supply terminal for the processor module and is connected to output pin OUTA of control chip U2. Control chip U2's input pin IN is connected to a corresponding voltage, and its output pin OUTA provides operating voltage for processor U1.
[0040] In addition, the second power supply pin J1_VBUS of the Type-C interface J1 serves as the second power supply terminal of the Type-C interface J1 and is connected to the power supply pin USB_VBUS of the processor U1. It is understood that when the external device acts as the master device, the output pin OUTA of the control chip U2 stops outputting, and the external device can power the USB interface circuit through the Type-C interface J1, such as using the second power supply pin J1_VBUS of the Type-C interface J1 to provide the operating voltage for the processor U1.
[0041] The overcurrent protection pin USB_OC of the processor U1 serves as the overcurrent protection end of the processor module, and the indication pin FLGA of the control chip U2 serves as the indication end of the power control switch module. The overcurrent protection pin USB_OC of the processor U1 is connected to the indication pin FLGA of the control chip U2.
[0042] The master-slave identification module includes a first pull-up resistor R1, a first current-limiting resistor R2, a common-anode diode D1, a second pull-up resistor R3, a second current-limiting resistor R4, and an NMOS transistor Q1. The first end of the first pull-up resistor R1 is connected to an operating voltage, such as a 3.3V operating voltage; the anode end of the common-anode diode D1 is connected to the second end of the first pull-up resistor R1, and the anode end of the common-anode diode D1 is also connected to the first end of the first current-limiting resistor R2, and the second end of the first current-limiting resistor R2 is connected to the identification pin USB_ID of the processor U1. That is, the identification pin USB_ID of the processor U1 is connected to the master-slave identification module as the identification end of the processor module. The two cathode ends of the common-anode diode are respectively connected to the first configuration channel pin CC1 and the second configuration channel pin CC2 of the Type-C interface.
[0043] The drain terminal of the NMOS transistor Q1 is connected to the first end of the second pull-up resistor R3, the gate terminal of the NMOS transistor Q1 is connected to the second current-limiting resistor R4, the source terminal of the NMOS transistor Q1 is grounded, and the second end of the second pull-up resistor R3 is connected to an operating voltage, such as a 3.3V operating voltage. The other end of the second current-limiting resistor R4 is connected to the identification pin USB_ID. The control chip U2 also includes an enable pin ENA, which serves as the enable terminal of the power control switch module and is connected to the drain terminal of the NMOS transistor Q1. It is conceivable that the enable pin ENA can be used to control the output pin OUTA.
[0044] If the external device is a master device, when the Type-C interface J1 is connected to the external device via a USB cable, the first configuration channel pin CC1 and the second configuration channel pin CC2 of the Type-C interface J1 are left floating. Due to the series connection of the first pull-up resistor R1 and the first current-limiting resistor R2, the identification pin USB_ID of the processor U1 detects a high level. As can be seen from the conduction characteristics of the NMOS transistor Q1, in the USB interface circuit, when the identification pin USB_ID detects a high level, the NMOS transistor Q1 turns on, and the enable pin ENA of the control chip U2 is at a low level. Therefore, the output pin OUTA of the control chip U2 stops outputting, and the first power pin USB_VBUS of the processor U1 is connected to the second power pin J1_VBUS of the Type-C interface J1, thereby allowing the processor U1 to complete the identification as a slave device.
[0045] If the external device is a slave device, when Type-C interface J1 is connected to the external device via an OTG cable, at least one of the first configuration channel pin CC1 and the second configuration channel pin CC2 of Type-C interface J1 is pulled down to ground via an equivalent resistor. This equivalent resistor is the inherent impedance of the OTG cable. Therefore, the first pull-up resistor R1 and the first current-limiting resistor R2 divide the voltage, causing the identification pin USB_ID of processor U1 to detect a low level. It should be noted that the resistance values of the first pull-up resistor R1 and the first current-limiting resistor R2 can be adjusted to ensure that the voltage level of the identification pin USB_ID is in the low range after voltage division. For example, a 100K ohm resistor can be used as the first pull-up resistor R1 and a 1K ohm resistor can be used as the first current-limiting resistor R2. Since the identification pin USB_ID detects a low level, the NMOS tube Q1 is not turned on, and the control chip U2 is connected to the working voltage through the second pull-up resistor R2, so that the output pin OUTA supplies power to the first power supply pin USB_VBUS of the processor U1, and the output pin OUTA also supplies power to the second power supply pin J1_VBUS of the Type-C interface J1, thereby enabling the processor U1 to complete the identification as the main device.
[0046] An embodiment of the present application also provides an interface circuit board, which includes the USB interface circuit as described in the above embodiment. The circuit board can be used in electronic devices such as mobile phones and wearable devices to assist electronic devices in automatically identifying master and slave devices, and facilitate data exchange between devices.
[0047] In addition, an embodiment of the present application further provides an electronic device, which includes the interface circuit board described in the above embodiment. Specifically, the electronic device can be a mobile phone, a computer, a wearable device, etc. The electronic device with the above interface circuit board is not only able to adapt to the Type-C interface, but also can automatically identify the role of the device during data exchange, such as automatically identifying the device as a master device or a slave device, thereby facilitating data exchange between devices.
[0048] It is conceivable that the electronic device exchanges data with the external device via an external data cable. In some embodiments, the external data cable is a USB cable. For example, taking the electronic device as a mobile phone and the external device as a computer, when the mobile phone is connected to the computer via the USB cable, the identification terminal of the processor module in the USB interface circuit can detect a high level and switch the power source, thereby automatically identifying the electronic device as a slave device.
[0049] The external data cable is an OTG cable. For example, taking the electronic device as a mobile phone and the external device as a USB flash drive, when the mobile phone is connected to the USB flash drive via the OTG cable, the identification end of the processor module on the USB interface circuit can detect a low level and power the processor module and the Type-C interface, and the electronic device automatically identifies the device as the main device.
[0050] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0051] Note that the above are only preferred embodiments of the present application and the technical principles employed. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application has been described in more detail through the above embodiments, the present application is not limited to the above embodiments and may include many other equivalent embodiments without departing from the scope of the present application. The scope of the present application is determined by the scope of the appended claims.
Claims
1. A USB interface circuit, characterized in that: include: A processor module, the processor module including an identification terminal for performing master and slave device identification; a power control switch module, wherein an indication terminal of the power control switch module is connected to an overcurrent protection terminal of the processor module, and the power control switch module further comprises an enable terminal, wherein the enable terminal is used to control the output of the power control switch module; A Type-C interface, wherein the Type-C interface is provided with a configuration channel pin and the Type-C interface is connected to an external device via an external data line; a master-slave identification module, wherein a detection terminal of the master-slave identification module is connected to the configuration channel pin, a first output terminal of the master-slave identification module is connected to the identification terminal, and a second output terminal of the master-slave identification module is connected to the enable terminal; The master-slave identification module includes a first detection unit and a second detection unit, one end of the first detection unit is connected to the configuration channel pin as the detection end, the other end of the first detection unit is connected to the identification end as the first output end of the master-slave identification module, the control end of the second detection unit is connected to the other end of the first detection unit, the output end of the second detection unit is connected to the enable end as the second output end of the master-slave identification module, and the other end of the first detection unit is used to control the output of the output end of the second detection unit; Moreover, the second detection unit includes a second pull-up resistor, a second current limiting resistor and a switch tube, the input end of the switch tube is connected to the working voltage through the second pull-up resistor, the control end of the switch tube is connected to the identification end through the second current limiting resistor, and the output end of the switch tube is grounded.
2. The USB interface circuit according to claim 1, wherein: The first detection unit includes a first pull-up resistor, a first current-limiting resistor and a unidirectional conductive device; A first end of the first pull-up resistor is connected to a power supply voltage, a second end of the first pull-up resistor is connected to a first end of the first current-limiting resistor, and a second end of the first current-limiting resistor is connected to the identification end; One end of the unidirectional conductive device is connected to the second end of the first pull-up resistor, and the other end of the unidirectional conductive device is connected to the configuration channel pin. When the configuration channel pin is pulled down to ground, the unidirectional conductive device is turned on.
3. The USB interface circuit according to claim 2, wherein: There are two configuration channel pins, and the unidirectional conducting device is a common anode diode; The two cathode terminals of the common-anode diode are respectively connected to the two configuration channel pins, and the anode terminal of the common-anode diode is connected to the second end of the pull-up resistor.
4. The USB interface circuit according to claim 1, wherein: The switch tube is an NMOS tube, the drain end of the NMOS tube serves as the input end of the switch tube, and the drain end of the NMOS tube is also connected to the enable end, the gate end of the NMOS tube serves as the control end of the switch tube and is connected to the second current limiting resistor, and the source end of the NMOS tube serves as the output end of the switch tube and is grounded.
5. The USB interface circuit according to claim 1, wherein: The processor module also includes a first power supply end for accessing an operating voltage; when the external device is a master device, the second power supply end of the Type-C interface provides an operating voltage for the first power supply end of the processor module; when the external device is a slave device, the output end of the power control switch module provides an operating voltage for the first power supply end of the processor module.
6. An interface circuit board, characterized in that: The interface circuit board comprises the USB interface circuit according to any one of claims 1 to 5.
7. An electronic device, characterized in that: The electronic device comprises the interface circuit board according to claim 6.
8. The electronic device according to claim 7, wherein: The electronic device exchanges data with an external device via an external data line; when the electronic device acts as a slave device, the external data line is a USB line; when the electronic device acts as a master device, the external data line is an OTG line.