USB interface working mode switching circuit, circuit board and electronic equipment

By designing the USB interface working mode switching circuit, using the connection between the Type-c interface and the USB switching module, the HOST and DEVICE working mode switching of the USB interface is realized, solving the problem of single functions in the existing technology, meeting the needs of complex functions and Expanded application scope.

CN222482723UActive Publication Date: 2025-02-14ZHUHAI SHIXI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202323401923.1
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2023-12-13
Publication Date
2025-02-14
Estimated Expiration
2033-12-13

AI Technical Summary

Technical Problem

In the prior art, the master control platform with only one set of USB interfaces cannot realize the flexible switching of the two working modes of HOST and DEVICE, resulting in a single function and cannot meet the needs of complex functions.

Method used

A USB interface working mode switching circuit is designed, and the USB switching module is connected through the Type-C interface, and the conduction state of the USB switching module is controlled by the high and low level of the power pin to realize the HOST and DEVICE working modes of the USB interface. Switch.

Benefits of technology

It realizes the dual functions of USB interface, can switch between HOST and DEVICE working modes, meet the needs of different application scenarios, and drives the peripheral module to work in HOST mode, expanding the application range of the circuit.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN222482723U_ABST
    Figure CN222482723U_ABST
Patent Text Reader

Abstract

The utility model provides a USB interface working mode switching circuit, a circuit board and an electronic device, and relates to the technical field of USB interfaces, a power supply pin of a Type-c interface in the circuit is connected with an enabling control end of a USB switching module, and the power supply pin of the Type-c interface controls the conduction state between the USB switching module and the USB interface by controlling the enabling control end of the USB switching module; when the power supply pin is at a low level, the USB interface is in a HOST working mode and drives the first peripheral module to work, and when the power supply pin is at a high level, the USB interface is conducted with the Type-c interface, and the USB interface is in a DEVICE working mode. According to the circuit, flexible switching of a main control platform with a single USB interface between a HOST working mode and a DEVICE working mode is achieved, flexibility and function expansibility are achieved under different conditions, and the application range is widened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The utility model relates to the technical field of USB interfaces, and in particular to a USB interface working mode switching circuit, a circuit board and electronic equipment. Background Art

[0002] USB (Universal Serial Bus) is a commonly used computer interface standard that can connect multiple devices to the same host. The USB protocol specifies two device roles: HOST (master device) and DEVICE (slave device). On the same master platform, a device can only play one role, either HOST or DEVICE. For a master platform with only one set of USB interfaces, when the product functional requirements are complex and require it to simultaneously realize the functions of HOST connecting to multiple USB peripherals and connecting to a PC as a DEVICE, a control circuit is urgently needed to realize the working mode switching of the master platform. Utility Model Content

[0003] In view of the shortcomings of the above-mentioned prior art, the utility model provides a USB interface working mode switching circuit, circuit board and electronic device, which solves the technical problem that the prior art has only one set of USB interfaces and the USB interface has a single function and can only realize one of the working modes of HOST or DEVICE.

[0004] The first aspect of the utility model provides a USB interface working mode switching circuit, comprising: a Type-c interface, a USB switching module, a USB interface and a first peripheral module;

[0005] The power pin of the Type-c interface is connected to the enable control terminal of the USB switching module, the data transmission pin of the Type-c interface is connected to the first terminal of the USB switching module, and the configuration channel pin of the Type-c interface is connected to the second terminal of the USB switching module;

[0006] The data transmission pin of the USB interface is connected to the third end of the USB switching module, the detection pin of the USB interface is connected to the fourth end of the USB switching module, and the communication pin of the USB interface is connected to the first end of the first peripheral module;

[0007] The second end of the first peripheral module is connected to the fifth end of the USB switching module;

[0008] When the power pin of the Type-C interface is at a low level, the enable control end of the USB switching module controls the fourth end and the fifth end of the USB switching module to be turned on, and the detection pin of the USB interface is connected to the first peripheral module, so that the USB interface is in the HOST working mode and drives the first peripheral module to work;

[0009] When the power pin of the Type-c interface is at a high level, the enable control end of the USB switching module controls the first end and the third end of the USB switching module to be connected, the second end and the fourth end of the USB switching module are connected, and the detection pin of the USB interface is connected to the Type-c interface to put the USB interface in DEVICE working mode.

[0010] Optionally, the circuit further includes a second peripheral module;

[0011] The first end of the second peripheral module is connected to the data transmission pin of the USB interface, and the second end of the second peripheral module is connected to the sixth end of the USB switching module;

[0012] When the power pin of the Type-C interface is at a low level, the enable control end of the USB switching module controls the sixth end of the USB switching module to be connected to the third end, and the USB interface is in the HOST working mode and drives the second peripheral module to work;

[0013] When the power pin of the Type-c interface is at a high level, the enable control end of the USB switching module controls the sixth end of the USB switching module to be connected to the first end, the USB interface is in the DEVICE working mode, and the second peripheral module works synchronously.

[0014] Optionally, the USB switching module includes a device switching switch unit and a signal detection switch unit;

[0015] The enable control end of the device switching unit is connected to the power pin of the Type-c interface, the first end of the device switching unit is connected to the data transmission pin of the Type-c interface, the second end of the device switching unit is connected to the data transmission pin of the USB interface, and the third end of the device switching unit is connected to the second end of the second peripheral module;

[0016] The enable control end of the signal detection switch unit is connected to the power pin of the Type-c interface, the first end of the signal detection switch unit is connected to the configuration channel pin of the Type-c interface, the second end of the signal detection switch unit is connected to the detection pin of the USB interface, and the third end of the signal detection switch unit is connected to the second end of the first peripheral module.

[0017] Optionally, the device switching switch unit includes a first switch and a second switch, and the signal detection switch unit includes a third switch;

[0018] The data transmission pin of the Type-C interface is connected to the first end of the first switch, the second end of the first switch is connected to the data transmission pin of the USB interface, the common end of the first switch is connected to the second peripheral module, the second peripheral module is also connected to the common end of the second switch, the first end of the second switch is connected to the communication pin of the USB interface through the first peripheral module, and the second end of the second switch is connected to the data transmission pin of the USB interface;

[0019] The configuration channel pin of the Type-c interface is connected to the first end of the third switch, the second end of the third switch is connected to the first peripheral module, and the common end of the third switch is connected to the detection pin of the USB interface.

[0020] Optionally, the first switch, the second switch and the third switch all include an enable terminal; the circuit further includes a first resistor and a second resistor;

[0021] The power pin of the Type-C interface is connected to the first end of the first resistor, the second end of the first resistor is connected to the first end of the second resistor, and the second end of the second resistor is connected to the ground end;

[0022] The second end of the first resistor is also connected to the enable end of the first switch, the enable end of the second switch, and the enable end of the third switch respectively.

[0023] Optionally, the second peripheral module includes a USB2.0 hub, a first end of the USB2.0 hub is connected to the common end of the first switch, a second end of the USB2.0 hub is connected to the common end of the second switch, and the USB2.0 hub is provided with a plurality of USB2.0 connection ports, and the USB2.0 connection ports are used to connect USB2.0 external devices.

[0024] Optionally, the first peripheral module includes a USB 3.0 unit and a display output unit, and the communication pin of the USB interface includes a first communication pin and a second communication pin;

[0025] The first end of the USB3.0 unit is connected to the first communication pin of the USB interface, and the second end of the USB3.0 unit is connected to the first end of the second switch;

[0026] The first end of the display output unit is connected to the second communication pin of the USB interface, and the second end of the display output unit is connected to the second end of the third switch.

[0027] Optionally, the USB 3.0 unit includes a USB 3.0 external device;

[0028] The display output module includes a DP to HDMI chip and an HDMI interface, the first end of the DP to HDMI chip is connected to the second end of the third switch, the second end of the DP to HDMI chip is connected to the second communication pin of the USB interface, the third end of the DP to HDMI chip is connected to the HDMI interface, and the HDMI interface is used to access a display device.

[0029] Optionally, when the power pin of the Type-C interface is at a low level, the common end of the first switch is connected to the second end of the first switch, the common end of the second switch is connected to the first end of the second switch, and the common end of the third switch is connected to the second end of the third switch;

[0030] The detection pin of the USB interface is connected to the third switch and then connected to the display output unit, the first communication pin of the USB interface is connected to the USB3.0 unit, the second switch, the second peripheral module and the first switch in sequence, and is connected to the data transmission pin of the USB interface;

[0031] The second communication pin of the USB interface is connected to the display output unit.

[0032] Optionally, when the power pin of the Type-C interface is at a high level, the common end of the first switch is connected to the first end of the first switch, the common end of the second switch is connected to the second end of the second switch, and the common end of the third switch is connected to the first end of the third switch;

[0033] The detection pin of the USB interface is connected to the third switch and then connected to the configuration channel pin of the Type-c interface. The data transmission pin of the USB interface is connected to the first switch, the second peripheral module and the second switch in sequence, and is connected to the data transmission pin of the USB interface.

[0034] Optionally, the USB interface includes a PD controller, the PD controller is connected to a detection pin of the USB interface, and the PD controller determines the working mode of the USB interface based on the connection state of the detection pin;

[0035] When the detection pin of the USB interface is connected to the first peripheral module, the PD controller controls the USB interface to operate in a HOST operating mode;

[0036] When the communication pin of the USB interface is connected to the configuration channel pin of the Type-c interface, the PD controller controls the USB interface to operate in DEVICE working mode.

[0037] Optionally, the configuration channel pin of the Type-c interface includes a first configuration channel pin and a second configuration channel pin, and the first configuration channel pin is short-circuited with the second configuration channel pin to implement the forward and reverse insertion function of the Type-c interface.

[0038] The USB interface working mode switching circuit provided by the utility model supports the dual functions of the USB interface, so that the USB interface can be switched between the HOST working mode and the DEVICE working mode. In the HOST working mode, the USB interface can communicate and control other devices as a host device; while in the DEVICE working mode, the USB interface can simulate the role of the USB device and establish communication with other host devices, which is convenient for the USB interface to be tested and used; and the circuit can flexibly switch the working mode of the USB interface, connect the external power supply or device through the Type-c interface, and then control the level of the power pin to switch the conduction state of the USB switching module, so as to realize the switching of the HOST and DEVICE working modes of the USB interface, so that the USB interface can be adaptively adjusted and configured according to specific needs and application scenarios; at the same time, the circuit can drive the first peripheral module to work in the HOST working mode, which expands the application scope of the circuit. In summary, the above circuit realizes the flexible switching between the HOST and DEVICE working modes for the main control platform with only one set of USB interfaces, and provides flexibility and functional extensibility in different working modes, which expands the application scope of the circuit.

[0039] A second aspect of the utility model provides a circuit board, comprising the USB interface working mode switching circuit as described in any one of the above items.

[0040] A third aspect of the utility model provides an electronic device, comprising the USB interface working mode switching circuit as described in any one of the above items.

[0041] Other features and advantages of the utility model will be described in the subsequent description, and partly become apparent from the description, or understood by practicing the utility model. The purpose and other advantages of the utility model can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings.

[0042] The technical solution of the utility model is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0044] Figure 1 A schematic diagram of the structure of a USB interface working mode switching circuit in an embodiment provided in the present application;

[0045] Figure 2 A schematic diagram of the structure of a USB interface working mode switching circuit in another embodiment provided by the present application;

[0046] Figure 3 A schematic diagram of the structure of a USB switching module in a USB interface working mode switching circuit in another embodiment provided by the present application;

[0047] Figure 4 A schematic diagram of a specific circuit structure of a USB interface in a HOST working mode in a USB interface working mode switching circuit in an embodiment provided by the present application;

[0048] Figure 5 A schematic diagram of a specific circuit structure of a USB interface in a DEVICE working mode in a USB interface working mode switching circuit in an embodiment provided by the present application;

[0049] Figure 6 A specific circuit diagram of the connection between the power pin and the enable end of each switch in the USB interface working mode switching circuit in an embodiment provided in the present application.

[0050] In the figure:

[0051] A1, a first end of the first switch; B1, a second end of the first switch; COM1, a common end of the first switch;

[0052] A2, a first end of the second switch; B2, a second end of the second switch; COM2, a common end of the second switch;

[0053] A3, a first end of a third switch; B3, a second end of the third switch; COM3, a common end of the third switch;

[0054] VBUS, power pin of Type-c interface; C1, data transmission pin of Type-c interface; C2, configuration channel pin of Type-c interface;

[0055] D1, data transmission pin of USB interface; D2, detection pin of USB interface; D3, communication pin of USB interface; OUT1, first communication pin of USB interface; OUT2, second communication pin of USB interface;

[0056] E1, a first end of the USB switch module; E2, a second end of the USB switch module; E3, a third end of the USB switch module; E4, a fourth end of the USB switch module; E5, a fifth end of the USB switch module; E6, a sixth end of the USB switch module;

[0057] F1, a first end of the device switching switch unit; F2, a second end of the device switching switch unit; F3, a third end of the device switching switch unit;

[0058] G1, a first end of the signal detection switch unit; G2, a second end of the signal detection switch unit; G3, a third end of the signal detection switch unit;

[0059] EN, enable terminal; R1, first resistor; R2, second resistor. DETAILED DESCRIPTION

[0060] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.

[0061] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present utility model, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0062] In the present invention, unless otherwise clearly specified and limited, the terms "install", "connect", "connect", "fix" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0063] The first aspect of the utility model provides a USB interface working mode switching circuit, such as Figure 1 As shown, it includes: a Type-c interface, a USB switching module, a USB interface and a first peripheral module, wherein the power pin VBUS of the Type-c interface is connected to the enable control end of the USB switching module, the data transmission pin C1 of the Type-c interface is connected to the first end E1 of the USB switching module, the configuration channel pin C2 of the Type-c interface is connected to the second end E2 of the USB switching module, the data transmission pin D1 of the USB interface is connected to the third end E3 of the USB switching module, the detection pin D2 of the USB interface is connected to the fourth end E4 of the USB switching module, the communication pin D3 of the USB interface is connected to the first end of the first peripheral module, and the second end of the first peripheral module is connected to the The fifth end E5 is connected, when the power pin VBUS of the Type-c interface is at a low level, the enable control end of the USB switching module controls the fourth end E4 and the fifth end E5 of the USB switching module to be turned on, and the detection pin D2 of the USB interface is connected to the first peripheral module, so that the USB interface is in the HOST working mode and drives the first peripheral module to work, when the power pin VBUS of the Type-c interface is at a high level, the enable control end of the USB switching module controls the first end E1 and the third end E3 of the USB switching module to be turned on, the second end E2 and the fourth end E4 of the USB switching module to be turned on, and the detection pin D2 of the USB interface is connected to the Type-c interface, so that the USB interface is in the DEVICE working mode.

[0064] The USB interface working mode switching circuit provided by the utility model supports the dual functions of the USB interface, so that the USB interface can be switched between the HOST working mode and the DEVICE working mode. In the HOST working mode, the USB interface can communicate and control other devices as a host device; while in the DEVICE working mode, the USB interface can simulate the role of the USB device and establish communication with other host devices, which is convenient for the USB interface to be tested and used; and the circuit can flexibly switch the working mode of the USB interface, connect the external power supply or device through the Type-c interface, and then control the level of the power pin VBUS to switch the conduction state of the USB switching module, so as to realize the switching of the HOST and DEVICE working modes of the USB interface, so that the USB interface can be adaptively adjusted and configured according to specific needs and application scenarios; at the same time, the circuit can drive the first peripheral module to work in the HOST working mode, which expands the application scope of the circuit. In summary, the above circuit realizes the flexible switching between the HOST and DEVICE working modes for the main control platform with only one set of USB interfaces, and provides flexibility and functional extensibility in different working modes, which expands the application scope of the circuit.

[0065] Specifically, in the above embodiment, Figure 2 As shown, the circuit also includes a second peripheral module, wherein a first end of the second peripheral module is connected to a data transmission pin D1 of the USB interface, and a second end of the second peripheral module is connected to a sixth end E6 of the USB switching module. When the power pin VBUS of the Type-c interface is at a low level, the enable control end of the USB switching module controls the sixth end E6 of the USB switching module to be turned on with the third end E3, and the USB interface is in a HOST working mode and drives the second peripheral module to work; when the power pin VBUS of the Type-c interface is at a high level, the enable control end of the USB switching module controls the sixth end E6 of the USB switching module to be turned on with the first end E1, and the USB interface is in a DEVICE working mode, and the second peripheral module works synchronously.

[0066] In this embodiment, a second peripheral module is additionally provided between the USB interface and the USB switching module. Unlike the first peripheral module, the working state of the first peripheral module is switched according to the working mode of the USB interface, while the second peripheral module is always in a working state. For example, when the USB interface is in the HOST working mode, the USB interface is not connected to the Type-c interface, and the USB interface itself can drive the second peripheral module to work. When the USB interface is in the DEVICE working mode, the Type-c interface, the USB switching module, the second peripheral module and the USB interface are connected in sequence, and the second peripheral module is still in a working state. It can be seen that the second peripheral module can remain in a working state no matter what working state the USB interface is in, thereby expanding the functionality of the circuit provided in the present application and expanding the application scope of the circuit.

[0067] Further, such as Figure 3 As shown, the USB switching module includes a device switching switch unit and a signal detection switch unit, wherein the enable control end of the device switching switch unit is connected to the power pin VBUS of the Type-c interface, the first end F1 of the device switching switch unit is connected to the data transmission pin C1 of the Type-c interface, the second end F2 of the device switching switch unit is connected to the data transmission pin D1 of the USB interface, the third end F3 of the device switching switch unit is connected to the second end of the second peripheral module, the enable control end of the signal detection switch unit is connected to the power pin VBUS of the Type-c interface, the first end G1 of the signal detection switch unit is connected to the configuration channel pin C2 of the Type-c interface, the second end G2 of the signal detection switch unit is connected to the detection pin D2 of the USB interface, and the third end G3 of the signal detection switch unit is connected to the second end of the first peripheral module.

[0068] In this embodiment, the specific function of the USB switching module is to be controlled by the high and low levels of the power pin VBUS of the Type-c interface, and to determine the specific working mode of the USB interface by switching its own conduction state, thereby realizing the connection relationship of the circuits under different working modes. According to the function realized by the USB switching module, it is divided into two different functional units, and the two functional units are synchronously controlled by the power pin VBUS of the Type-c interface. One of them is a signal detection switch unit, and the signal detection switch unit is mainly connected to the detection pin D2 of the USB interface. When the signal detection switch unit is controlled by the enable control end, so that the detection pin D2 of the USB interface is connected to the first peripheral module, the USB interface is in the HOST working mode at this time. When the signal detection switch unit is controlled by the enable control end, so that the detection pin D2 of the USB interface is connected to the configuration channel pin C2 of the Type-c interface through the signal detection switch unit, the USB interface is in the DEVICE working mode at this time, and the signal detection switch unit realizes the switching of the USB interface working mode. The other functional unit is the device switching unit. Since the device switching unit and the signal detection switch unit are controlled synchronously, when the USB interface is in the HOST working mode, the USB interface directly drives the second peripheral module to work through the device switching unit, and when the USB interface is in the DEVICE working mode, the data transmission pin C1 of the Type-C interface is connected in turn through the device switching unit, the second peripheral module and the data transmission pin D1 of the USB interface. The USB switching module is divided into functions and can be controlled as a whole, which simplifies the overall structure of the circuit and the control method, making the switching of the USB interface working mode simple and reliable.

[0069] Further, such as Figure 4 and Figure 5 As shown, the device switching switch unit includes a first switch and a second switch, and the signal detection switch unit includes a third switch, wherein the data transmission pin C1 of the Type-c interface is connected to the first end A1 of the first switch, the second end B1 of the first switch is connected to the data transmission pin D1 of the USB interface, the common end COM1 of the first switch is connected to the second peripheral module, the second peripheral module is also connected to the common end COM2 of the second switch, the first end A2 of the second switch is connected to the communication pin D3 of the USB interface through the first peripheral module, the second end B2 of the second switch is connected to the data transmission pin D1 of the USB interface, the configuration channel pin C2 of the Type-c interface is connected to the first end A3 of the third switch, the second end B3 of the third switch is connected to the first peripheral module, and the common end COM3 of the third switch is connected to the detection pin D2 of the USB interface.

[0070] In addition to the power pin VBUS, the Type-c interface also has two important functional pins, namely the data transmission pin C1 and the configuration channel pin C2. The data transmission pin C1 is connected to the first switch in the USB switching module to switch the docking object of the USB data transmission signal, and the configuration channel pin is connected to the third switch of the USB switching module to switch the connection between the USB interface and other functional devices. The USB switching module, as the core component of the circuit, is specifically composed of three switches. Through different connection methods between the three switches, the USB switching module forms different conduction states to realize different functional requirements of the USB interface. At the same time, the configuration channel pin controls the USB interface to switch the conduction state to achieve the flexibility of connecting different configuration devices in different occasions.

[0071] In this embodiment, by connecting the data transmission pin C1 of the Type-c interface to the first switch of the USB switching module, the USB interface can select the second peripheral module connected thereto when the working mode is switched, dynamically switch USB signals of multiple functions, and realize more convenient and flexible interface control; by connecting the configuration channel pin C2 of the Type-c interface to the third switch of the USB switching module, flexible configuration device connection can be realized, and the flexibility and compatibility of the USB interface can be enhanced; and the USB switching module is specifically configured in the form of the first switch, the second switch and the third switch, which can conveniently realize the data transmission of the USB interface and the conduction of various signals, effectively reduce the complexity of the system, and improve the speed and quality of signal transmission.

[0072] Furthermore, the first switch, the second switch and the third switch all include an enable terminal EN; the circuit also includes a first resistor R1 and a second resistor R2, wherein Figure 6 As shown, the power pin VBUS of the Type-c interface is connected to the first end of the first resistor R1, the second end of the first resistor R1 is connected to the first end of the second resistor R2, the second end of the second resistor R2 is connected to the ground end, and the second end of the first resistor R1 is also respectively connected to the enable end EN of the first switch, the enable end EN of the second switch and the enable end EN of the third switch.

[0073] In this embodiment, the first resistor R1 and the second resistor R2 are connected in series to provide an impedance matching the enable terminal EN in each switch to ensure the stability of each switch during operation, thereby achieving more stable and reliable circuit control and effectively improving the performance and stability of the entire circuit; the design of the series resistor simplifies the structure of the entire circuit, reduces the complexity and volume of the circuit, and improves stability and reliability.

[0074] Specifically, in the above embodiment, the second peripheral module includes a USB2.0 hub, a first end of the USB2.0 hub is connected to the common end COM1 of the first switch, a second end of the USB2.0 hub is connected to the common end COM2 of the second switch, and the USB2.0 hub is provided with a plurality of USB2.0 connection ports, which are used to connect USB2.0 external devices.

[0075] In this embodiment, the second peripheral module is specifically configured as a USB 2.0 hub capable of connecting multiple USB 2.0 external devices simultaneously, meeting the connection requirements of multiple devices, making the circuit more expandable and flexible, and improving the convenience of using the circuit.

[0076] Specifically, in the above embodiment, the first peripheral module includes a USB3.0 unit and a display output unit, and the communication pin D3 of the USB interface includes a first communication pin OUT1 and a second communication pin OUT2, wherein the first end of the USB3.0 unit is connected to the second communication pin OUT2 of the USB interface, the second end of the USB3.0 unit is connected to the first end A2 of the second switch, the first end of the display output unit is connected to the second communication pin OUT2 of the USB interface, and the second end of the display output unit is connected to the second end B3 of the third switch.

[0077] In this embodiment, the first peripheral module is specifically divided into two different functional units, a USB3.0 unit and a display output unit, and different functional units correspond to different communication pins, so the communication pin D3 of the USB interface is also divided into a first communication pin OUT1 and a second communication pin OUT2, wherein the first communication pin OUT1 corresponds to the USB3.0 unit, and the second communication pin OUT2 corresponds to the display output module, and the two functional modules are relatively independent. When the USB interface is in the HOST working mode, the USB interface drives the first peripheral module to work through the communication pin D3, and when the USB interface is in the DEVICE working mode, the first peripheral module does not work.

[0078] Furthermore, the USB3.0 unit includes a USB3.0 external device, wherein the display output module includes a DP to HDMI chip and an HDMI interface, the first end of the DP to HDMI chip is connected to the second end of the third switch, the second end of the DP to HDMI chip is connected to the second communication pin of the USB interface, the third end of the DP to HDMI chip is connected to the HDMI interface, and the HDMI interface is used to access the display device.

[0079] In this embodiment, the USB 3.0 external device has a higher transmission speed than USB 2.0, and is more suitable for devices that transmit large amounts of data or have high bandwidth requirements. By connecting the USB 3.0 unit to the second communication pin OUT2 of the USB interface, high-speed data transmission can be directly sent to the USB 3.0 external device, thereby improving data transmission speed and efficiency; and the DP to HDMI chip converts the DP signal into an HDMI signal, thereby realizing signal conversion between different interfaces. This provides flexible compatibility for devices compatible with different interfaces, and users can use display devices with only an HDMI interface to connect to a USB interface.

[0080] Among them, the HDMI interface is a commonly used display connection interface with a simple and reliable plug-in and unplug mechanism. By introducing the HDMI interface into the design, users can easily connect and plug-in display devices, providing a better user experience; the HDMI interface can provide high-quality transmission and display effects when transmitting audio and video signals. Through the conversion of the DP to HDMI chip, the USB interface can transmit high-quality image and audio signals to the display device, providing better display output quality.

[0081] Specifically, in the above embodiment, Figure 4 As shown, when the power pin VBUS of the Type-c interface is at a low level, the common end COM1 of the first switch is connected to the second end B1 of the first switch, the common end COM2 of the second switch is connected to the first end A2 of the second switch, and the common end COM3 of the third switch is connected to the second end B3 of the third switch. The detection pin D2 of the USB interface is connected to the third switch and then connected to the display output unit. The first communication pin OUT1 of the USB interface is connected to the USB3.0 unit, the second switch, the second peripheral module and the first switch in sequence, and is connected to the data transmission pin D1 of the USB interface. The second communication pin OUT2 of the USB interface is connected to the display output unit.

[0082] In this embodiment, when the Type-c interface is not connected to an external power supply or device, the power pin VBUS is left floating as a low-level signal, so that the enable ends EN of the three switches receive low-level signals sent by the power pin VBUS, switching the conduction state of the USB switching module. At this time, the detection pin D2 of the USB interface is connected to the second end B3 of the third switch through the common end COM3 of the third switch, and then connected to the display output module. At this time, the USB interface is in the HOST working state. Using ALTMODE (Alternative Mode, the extended function mode defined in the interface standard), the first communication pin OUT1 of the USB interface outputs a set of transceiver signals, which is first connected to the USB3.0 unit, and is connected to the second peripheral module through the second switch, to achieve transmission between the second peripheral module and the USB3.0 unit, and the second communication pin OUT2 of the USB interface outputs another set of transceiver signals, which is connected to the display output module to display the data content.

[0083] Among them, ALT MODE specifically refers to a set of extended functions of the USB Type-C specification, which can provide additional functions and performance. In ALT MODE mode, the system can support multiple functions such as video output, audio output, data transmission, fast charging, etc. Different ALT MODEs define different functional combinations.

[0084] Specifically, in the above embodiment, Figure 5 As shown, when the power pin VBUS of the Type-c interface is at a high level, the common end COM1 of the first switch is connected to the first end A1 of the first switch, the common end COM2 of the second switch is connected to the second end B2 of the second switch, and the common end COM3 of the third switch is connected to the first end A3 of the third switch. The detection pin D2 of the USB interface is connected to the third switch and then connected to the configuration channel pin C2 of the Type-c interface. The data transmission pin D1 of the USB interface is connected to the first switch, the second peripheral module and the second switch in sequence, and is connected to the data transmission pin D1 of the USB interface.

[0085] In this embodiment, when the Type-c interface is connected to an external power supply or device, the power pin VBUS has a certain voltage value, usually 5V. At this time, the enable ends EN of the three switches all receive high-level signals. At this time, the specific working principle of the circuit is as follows: first, the detection pin D2 of the USB interface is connected to the first end A3 of the third switch through the common end COM3 of the third switch, and then connected to the configuration channel pin C2 of the Type-c interface. At this time, the USB interface is in the DEVICE working mode, and the first communication pin OUT1 and the second communication pin OUT2 of the USB interface are not turned on. After the data transmission pin C1 of the Type-c interface is connected to the first end A1 of the first switch, it is connected to the second peripheral module through the common end COM1 of the first switch, and then connected to the common end COM2 of the second switch and the second end B2 of the second switch, and finally connected to the data transmission pin D1 of the USB interface. When the USB interface works in the DEVICE working mode, the second peripheral module can still be connected for transmission.

[0086] Specifically, in the above embodiment, the USB interface includes a PD controller, which is connected to the detection pin D2 of the USB interface. The PD controller determines the working mode of the USB interface based on the connection status of the detection pin D2. When the detection pin D2 of the USB interface is connected to the first peripheral module, the PD controller controls the USB interface to work in the HOST working mode. When the communication pin D3 of the USB interface is connected to the configuration channel pin C2 of the Type-c interface, the PD controller controls the USB interface to work in the DEVICE working mode.

[0087] Among them, the PD (Power Delivery) controller is a power management chip or module used to control and manage the power transmission and charging protocol between devices. The PD controller is usually used to support the USB PD standard to provide higher power transmission and charging capabilities. The main functions of the PD controller include power management, protocol support, device identification and function negotiation, and ensuring charging protection and safety.

[0088] In this embodiment, the working state of the USB interface is determined by the connection state of the detection pin D2 connected to the PD controller. The PD controller provides a more flexible working mode switching method, which is convenient for users to choose according to actual needs, accurately meet user needs, improve user experience, and increase the usability of the device. The PD controller can automatically adjust the working state of the USB interface according to the connection state of the detection pin D2, specifically including the working current and voltage of the USB interface, to ensure the stability and safety of the device. At the same time, the PD controller is directly integrated in the USB interface without the need for additional external control circuits or chips, saving circuit board space and adapter costs, and improving the integration and production efficiency of the device.

[0089] Specifically, in the above embodiment, the configuration channel pin C2 of the Type-c interface includes a first configuration channel pin and a second configuration channel pin, and the first configuration channel pin is short-circuited with the second configuration channel pin to realize the forward and reverse insertion function of the Type-c interface.

[0090] In this embodiment, the first configuration channel pin and the second configuration channel pin in the Type-c interface are short-circuited to realize the forward and reverse plug-in function of the Type-c interface, which is convenient for users to plug and unplug, improves the convenience of use and operating efficiency, reduces the risk of damage to the interface and plug, improves the reliability of the interface and the durability of the plug, and then through a unified interface standard, allows users to share and connect more easily between different devices, increasing compatibility and interoperability.

[0091] A second aspect of the utility model provides a circuit board, comprising the above-mentioned USB interface working mode switching circuit.

[0092] A third aspect of the utility model provides an electronic device, comprising the above-mentioned USB interface working mode switching circuit.

[0093] The circuit board and electronic device provided by the utility model are provided with a USB interface working mode switching circuit, which realizes flexible switching between the HOST and DEVICE working modes through only one set of USB interfaces, and provides flexibility and functional expansibility in different working modes, so that the main control platform has a wider range of applications.

[0094] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A USB interface working mode switching circuit, characterized in that: include: Type-c interface, USB switch module, USB interface and first peripheral module; The power pin of the Type-c interface is connected to the enable control terminal of the USB switching module, the data transmission pin of the Type-c interface is connected to the first terminal of the USB switching module, and the configuration channel pin of the Type-c interface is connected to the second terminal of the USB switching module; The data transmission pin of the USB interface is connected to the third end of the USB switching module, the detection pin of the USB interface is connected to the fourth end of the USB switching module, and the communication pin of the USB interface is connected to the first end of the first peripheral module; The second end of the first peripheral module is connected to the fifth end of the USB switching module; When the power pin of the Type-C interface is at a low level, the enable control end of the USB switching module controls the fourth end and the fifth end of the USB switching module to be turned on, and the detection pin of the USB interface is connected to the first peripheral module, so that the USB interface is in the HOST working mode and drives the first peripheral module to work; When the power pin of the Type-c interface is at a high level, the enable control end of the USB switching module controls the first end and the third end of the USB switching module to be connected, the second end and the fourth end of the USB switching module are connected, and the detection pin of the USB interface is connected to the Type-c interface to put the USB interface in DEVICE working mode.

2. The USB interface working mode switching circuit according to claim 1, characterized in that: The circuit also includes a second peripheral module; The first end of the second peripheral module is connected to the data transmission pin of the USB interface, and the second end of the second peripheral module is connected to the sixth end of the USB switching module; When the power pin of the Type-C interface is at a low level, the enable control end of the USB switching module controls the sixth end of the USB switching module to be connected to the third end, and the USB interface is in the HOST working mode and drives the second peripheral module to work; When the power pin of the Type-c interface is at a high level, the enable control end of the USB switching module controls the sixth end of the USB switching module to be connected to the first end, the USB interface is in the DEVICE working mode, and the second peripheral module works synchronously.

3. The USB interface working mode switching circuit according to claim 2, characterized in that: The USB switching module includes a device switching switch unit and a signal detection switch unit; The enable control end of the device switching unit is connected to the power pin of the Type-c interface, the first end of the device switching unit is connected to the data transmission pin of the Type-c interface, the second end of the device switching unit is connected to the data transmission pin of the USB interface, and the third end of the device switching unit is connected to the second end of the second peripheral module; The enable control end of the signal detection switch unit is connected to the power pin of the Type-c interface, the first end of the signal detection switch unit is connected to the configuration channel pin of the Type-c interface, the second end of the signal detection switch unit is connected to the detection pin of the USB interface, and the third end of the signal detection switch unit is connected to the second end of the first peripheral module.

4. The USB interface working mode switching circuit according to claim 3, characterized in that: The device switching switch unit includes a first switch and a second switch, and the signal detection switch unit includes a third switch; The data transmission pin of the Type-C interface is connected to the first end of the first switch, the second end of the first switch is connected to the data transmission pin of the USB interface, the common end of the first switch is connected to the second peripheral module, the second peripheral module is also connected to the common end of the second switch, the first end of the second switch is connected to the communication pin of the USB interface through the first peripheral module, and the second end of the second switch is connected to the data transmission pin of the USB interface; The configuration channel pin of the Type-c interface is connected to the first end of the third switch, the second end of the third switch is connected to the first peripheral module, and the common end of the third switch is connected to the detection pin of the USB interface.

5. The USB interface working mode switching circuit according to claim 4, characterized in that: The first switch, the second switch and the third switch all include an enable terminal; the circuit also includes a first resistor and a second resistor; The power pin of the Type-C interface is connected to the first end of the first resistor, the second end of the first resistor is connected to the first end of the second resistor, and the second end of the second resistor is connected to the ground end; The second end of the first resistor is also connected to the enable end of the first switch, the enable end of the second switch, and the enable end of the third switch respectively.

6. The USB interface working mode switching circuit according to claim 4, characterized in that: The second peripheral module includes a USB2.0 hub, a first end of the USB2.0 hub is connected to the common end of the first switch, a second end of the USB2.0 hub is connected to the common end of the second switch, and the USB2.0 hub is provided with a plurality of USB2.0 connection ports, and the USB2.0 connection ports are used to connect USB2.0 external devices.

7. The USB interface working mode switching circuit according to claim 4, characterized in that: The first peripheral module includes a USB3.0 unit and a display output unit, and the communication pins of the USB interface include a first communication pin and a second communication pin; The first end of the USB3.0 unit is connected to the first communication pin of the USB interface, and the second end of the USB3.0 unit is connected to the first end of the second switch; The first end of the display output unit is connected to the second communication pin of the USB interface, and the second end of the display output unit is connected to the second end of the third switch.

8. The USB interface working mode switching circuit according to claim 7, characterized in that: The USB 3.0 unit includes a USB 3.0 external device; The display output unit includes a DP to HDMI chip and an HDMI interface, the first end of the DP to HDMI chip is connected to the second end of the third switch, the second end of the DP to HDMI chip is connected to the second communication pin of the USB interface, the third end of the DP to HDMI chip is connected to the HDMI interface, and the HDMI interface is used to access a display device.

9. The USB interface working mode switching circuit according to claim 7, characterized in that: When the power pin of the Type-C interface is at a low level, the common end of the first switch is connected to the second end of the first switch, the common end of the second switch is connected to the first end of the second switch, and the common end of the third switch is connected to the second end of the third switch; The detection pin of the USB interface is connected to the third switch and then connected to the display output unit, the first communication pin of the USB interface is connected to the USB3.0 unit, the second switch, the second peripheral module and the first switch in sequence, and is connected to the data transmission pin of the USB interface; The second communication pin of the USB interface is connected to the display output unit.

10. The USB interface working mode switching circuit according to claim 7, characterized in that: When the power pin of the Type-C interface is at a high level, the common end of the first switch is connected to the first end of the first switch, the common end of the second switch is connected to the second end of the second switch, and the common end of the third switch is connected to the first end of the third switch; The detection pin of the USB interface is connected to the third switch and then connected to the configuration channel pin of the Type-c interface. The data transmission pin of the USB interface is connected to the first switch, the second peripheral module and the second switch in sequence, and is connected to the data transmission pin of the USB interface.

11. The USB interface working mode switching circuit according to claim 1, characterized in that: The USB interface comprises a PD controller, the PD controller is connected to a detection pin of the USB interface, and the PD controller determines an operating mode of the USB interface based on a connection state of the detection pin; When the detection pin of the USB interface is connected to the first peripheral module, the PD controller controls the USB interface to operate in a HOST operating mode; When the communication pin of the USB interface is connected to the configuration channel pin of the Type-c interface, the PD controller controls the USB interface to operate in DEVICE working mode.

12. The USB interface working mode switching circuit according to claim 1, characterized in that: The configuration channel pin of the Type-c interface includes a first configuration channel pin and a second configuration channel pin, and the first configuration channel pin is short-circuited with the second configuration channel pin to realize the forward and reverse insertion function of the Type-c interface.

13. A circuit board, characterized in that: It comprises a USB interface working mode switching circuit as described in any one of claims 1 to 12.

14. An electronic device, characterized in that: It comprises a USB interface working mode switching circuit as described in any one of claims 1-12.