CN215895451U - Switching circuit based on USB interface and audio equipment - Google Patents

Switching circuit based on USB interface and audio equipment Download PDF

Info

Publication number
CN215895451U
CN215895451U CN202121618813.9U CN202121618813U CN215895451U CN 215895451 U CN215895451 U CN 215895451U CN 202121618813 U CN202121618813 U CN 202121618813U CN 215895451 U CN215895451 U CN 215895451U
Authority
CN
China
Prior art keywords
main control
control chip
input
channel
output pin
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202121618813.9U
Other languages
Chinese (zh)
Inventor
郭世文
杨卉
何桂晓
曹磊
卢玉禄
吴海全
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhaoqing Deqing Guanxu Electronics Co ltd
Original Assignee
Zhaoqing Deqing Guanxu Electronics Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhaoqing Deqing Guanxu Electronics Co ltd filed Critical Zhaoqing Deqing Guanxu Electronics Co ltd
Priority to CN202121618813.9U priority Critical patent/CN215895451U/en
Application granted granted Critical
Publication of CN215895451U publication Critical patent/CN215895451U/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The utility model discloses a switching circuit based on a USB interface, which comprises: the device comprises a main control chip, a charging chip and an analog change-over switch, wherein the main control chip comprises a debugging pin, an audio pin and an input/output pin; the charging chip is connected with the main control chip; the simulation change over switch is used for being connected with the USB interface, the simulation change over switch with the input/output pin is connected, the simulation change over switch includes: the charging channel is connected with the charging chip; the debugging channel is connected with the debugging pin; the audio channel is connected with the audio pin; the main control chip is used for controlling the analog selector switch to be switched to the charging channel or the debugging channel or the audio channel through the input and output pin according to a preset interrupt event. The utility model realizes the multiplexing of the USB interface, saves the USB interface resource, avoids the conflict of the USB equipment and realizes the functions of upgrading and debugging, charging detection and wired audio.

Description

Switching circuit based on USB interface and audio equipment
Technical Field
The utility model relates to the technical field of communication, in particular to a switching circuit based on a USB interface and audio equipment.
Background
USB (Universal Serial Bus) is widely used in electronic devices, and the electronic devices are provided with USB interfaces to connect and communicate with a computer, and can also be charged by using the USB interface of an external terminal.
At present, earphones or sound boxes need more and more functions realized by a USB-C, such as functions of charging, debugging, upgrading, wired audio and the like. However, the data channel (DP/DN channel) of the USB interface is often used for both upgrade and debugging and charge detection, and in the case of multi-channel multiplexing, enumeration failure of the USB device is easily caused. And if DP/DN is also multiplexed on the basis of the function to realize the wired audio function, the realization is more difficult.
In the existing design, as shown in fig. 1, a data channel (DP/DP channel) is connected to a main control chip and a charging chip at the same time, so enumeration conflicts of two USB devices easily occur, which causes abnormal charging function and debugging function. Furthermore, the LINE-IN audio signal cannot be directly connected to the digital signal, and the USB port resources are not sufficient.
SUMMERY OF THE UTILITY MODEL
The utility model provides a switching circuit based on a USB interface and audio equipment, and aims to solve the problems of charging function, upgrading and debugging and conflict of wired audio functions on a USB link in an audio product.
In a first aspect, the present invention provides a switching circuit based on a USB interface, including: the device comprises a main control chip, a charging chip and an analog change-over switch, wherein the main control chip comprises a debugging pin, an audio pin and an input/output pin; the charging chip is connected with the main control chip; the simulation change over switch is used for being connected with the USB interface, the simulation change over switch with the input/output pin is connected, the simulation change over switch includes: the charging channel is connected with the charging chip; the debugging channel is connected with the debugging pin; the audio channel is connected with the audio pin; the main control chip is used for controlling the analog selector switch to be switched to the charging channel or the debugging channel or the audio channel through the input and output pin according to a preset interrupt event.
Further, the main control chip is used for being connected with a USB interface, the preset interrupt event includes that the main control chip detects external power input, and the main control chip is further used for controlling the analog changeover switch to be switched to the charging channel when the external power input is detected.
Further, the preset interrupt event further includes that the main control chip detects a key trigger signal, and the main control chip is further configured to control the analog switch to the debugging channel when the key trigger signal is detected.
Further, the switching circuit based on the USB interface further includes a key module, the key module includes a key and a pull-up resistor, the key is connected to the main control chip, and the pull-up resistor is connected between the key and the main control chip to provide a pull-up voltage.
Further, the preset interrupt event further includes that the main control chip detects a LINE-IN access signal, and the main control chip is further configured to control the analog switch to the audio channel when detecting the LINE-IN access signal.
Further, the main control chip includes a first input/output pin and a second input/output pin for outputting a high level or a low level, and the analog switch is configured to switch to the charging channel or the debugging channel or the audio channel according to a combination of the high level or the low level output by the first input/output pin and the second input/output pin.
Further, the analog switch is configured to switch to the charging channel when both the first input/output pin and the second input/output pin output a high level.
Further, the analog switch is configured to switch to the debug channel when the first input/output pin outputs a low level and the second input/output pin outputs a high level.
Further, the analog switch is configured to switch to the audio channel when the first input/output pin outputs a high level and the second input/output pin outputs a low level.
In a second aspect, the present invention also provides an audio device comprising: the switching circuit based on the USB interface is the switching circuit of the first aspect, and the audio module is connected with the main control chip.
Compared with the prior art, the utility model has the beneficial effects that: the simulation change-over switch is connected with the USB interface, the master control chip controls the simulation change-over switch by utilizing the input and output pins, the simulation change-over switch is provided with the charging channel, the debugging channel and the audio channel, the master control chip detects the interruption event and controls the simulation change-over switch to be switched to different channels according to different interruption events, therefore, the multiplexing of the USB interface is realized, the USB interface resource is saved, the conflict of USB equipment is avoided, and the functions of upgrading and debugging, charging detection and wired audio are realized.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 shows a prior art circuit schematic;
fig. 2 shows a schematic diagram of a switching circuit based on a USB interface according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the utility model herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the utility model. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Referring to fig. 2, an embodiment of the present invention provides a switching circuit based on a USB interface J1, including: the main control chip U1, the charging chip U2 and the analog change-over switch U3, the main control chip U1, including the debugging pin DP/DN and the audio pin MIC1/MIC2 and the input/output pin; the charging chip U2 is connected with the main control chip U1; an analog switch U3 for connecting with a USB interface J1, the analog switch U3 is connected with the input/output pin, the analog switch U3 includes: the charging channel CHG _ DP/CHG _ DN is connected with the charging chip U2; the debugging channel BT _ DP/BT _ DN is connected with the debugging pin DP/DN; the audio channel LINE _ R/LINE _ L is connected with the audio pin MIC1/MIC 2; the master control chip U1 is configured to control the analog switch U3 to switch to the charging channel CHG _ DP/CHG _ DN or the debug channel BT _ DP/BT _ DN or the audio channel LINE _ R/LINE _ L according to a preset interrupt event through the input/output pin.
Specifically, the USB interface J1 includes 4 ports, VCC, GND, DN, and DP, respectively, where VCC denotes a power supply, GND denotes ground, and DN and DP of J1 denote data ports of J1. The analog changeover switch U3 of the present embodiment is connected to DN and DP of the USB interface J1. The main control chip U1 is connected with VCC of the USB interface J1.
Through the implementation of the embodiment, the analog switch U3 is connected to the USB interface J1, the master control chip U1 controls the analog switch U3 by using input/output pins, the analog switch U3 sets a charging channel CHG _ DP/CHG _ DN, a debugging channel BT _ DP/BT _ DN, and an audio channel LINE _ R/LINE _ L, the master control chip U1 detects an interrupt event, and controls the analog switch U3 to switch to different channels according to different interrupt events, thereby realizing multiplexing of the USB interface J1, saving resources of the USB interface J1, avoiding conflicts of USB devices, and realizing functions of upgrading, charging detection, and wired audio.
In an embodiment, the main control chip U1 is configured to connect to a USB interface J1, the preset interrupt event includes that the main control chip U1 detects an external power input, and the main control chip U1 is further configured to control the analog switch U3 to switch to the charging channel CHG _ DP/CHG _ DN when the external power input is detected. The preset interrupt event refers to a preset event for triggering the analog switch U3 to switch channels, for example, a charging event, and the main control chip U1 triggers an interrupt after detecting an external power input. Specifically, the main control chip U1 is connected to VCC of the USB interface J1, whereby the main control chip U1 can detect an external power input. Herein, the external power source refers to a charging device, such as a charger and a mobile power source. That is, when the main control chip U1 detects that a power supply is connected, the analog switch U3 is controlled to switch to the charging channel CHG _ DP/CHG _ DN to perform a charging operation, thereby implementing a charging function.
It should be noted that the control chip in this embodiment is connected to the charging chip U2 via an I2C bus, and the I2C bus is a simple, bidirectional two-wire synchronous serial bus that only requires two wires to transmit information between devices connected to the bus. The main control chip U1 configures software for the charging chip U2 through the I2C, and releases the DP/DN only after configuration is completed, so that accurate configuration and successful handshake of the charging BC1.2 protocol are effectively guaranteed, and a quick charging function is realized. The BC1.2 protocol (Battery Charging v1.2) is a protocol formulated by a BC (Battery Charging) group under the USB-IF, and is mainly used for standardizing the requirements of Battery Charging, and the protocol was originally implemented based on the USB2.0 protocol.
In an embodiment, the preset interrupt event further includes that the main control chip U1 detects a key trigger signal, and the main control chip U1 is further configured to control the analog switch U3 to switch to the debug channel BT _ DP/BT _ DN when the key trigger signal is detected. In the preset interrupt event, the main control chip U1 triggers an interrupt after detecting a key trigger signal, that is, the key trigger signal is generated after the user presses a key to trigger the interrupt. Specifically, the switching circuit further comprises a key module, the key module comprises a key K1 and a pull-up resistor Rp, the key K1 is connected with the main control chip U1, and the pull-up resistor Rp is connected between the key K1 and the main control chip U1 to provide a pull-up voltage. When a user presses a key, the pull-up resistor Rp is conducted to provide a pull-up voltage, the main control chip U1 detects the pull-up voltage to indicate that a key trigger signal is detected, and therefore an interrupt event is triggered, the main control chip U1 controls the analog switch U3 to be switched to the debugging channel BT _ DP/BT _ DN to execute debugging actions, the debugging function is achieved, and the product can be upgraded, debugged and burned.
IN an embodiment, the preset interrupt event further includes that the main control chip U1 detects a LINE-IN access signal, and the main control chip U1 is further configured to control the analog switch U3 to switch to the audio channel LINE _ R/LINE _ L when detecting the LINE-IN access signal. In this embodiment, the main control chip U1 is further connected to a speaker, and the main control chip U1 controls the speaker to make a sound. The LINE-IN refers to an audio LINE input, and when the LINE-IN interface is inserted, the main control chip U1 can detect a LINE-IN access signal. When the main control chip U1 detects that a LINE-IN LINE is inserted, the analog switch U3 is controlled to switch to the audio channel LINE _ R/LINE _ L to execute playing action, and a wired audio function is realized.
In an embodiment, the main control chip U1 includes a first input/output pin GPIO1 and a second input/output pin GPIO2 for outputting a high level or a low level, and the analog switch U3 is configured to switch to the charging channel CHG _ DP/CHG _ DN or the debug channel BT _ DP/BT _ DN or the audio channel LINE _ R/LINE _ L according to a combination of the high level or the low level output by the first input/output pin GPIO1 and the second input/output pin GPIO 2.
Specifically, the combination of the high level or the low level output by the first input/output pin GPIO1 and the second input/output pin GPIO2 includes the following:
the first method comprises the following steps: the first input/output pin GPIO1 outputs a high level, and the second input/output pin GPIO2 outputs a high level;
and the second method comprises the following steps: the first input/output pin GPIO1 outputs a low level, and the second input/output pin GPIO2 outputs a high level;
and the third is that: the first input/output pin GPIO1 outputs a high level, and the second input/output pin GPIO2 outputs a low level;
the analog switch U3 can switch the charging channel CHG _ DP/CHG _ DN or the debugging channel BT _ DP/BT _ DN or the audio channel LINE _ R/LINE _ L according to three combinations outputted from the first input/output pin GPIO1 and the second input/output pin GPIO2, that is, each combination is used for controlling to switch different channels.
In a specific implementation, the analog switch U3 is configured to switch to the charging channel CHG _ DP/CHG _ DN when both the first input/output pin GPIO1 and the second input/output pin GPIO2 output a high level. That is, in the first combined state, the analog changeover switch U3 is switched to the charging channel CHG _ DP/CHG _ DN.
The analog switch U3 is configured to switch to the debug channel BT _ DP/BT _ DN when the first input/output pin GPIO1 outputs a low level and the second input/output pin GPIO2 outputs a high level. That is, in the second combination state, the analog changeover switch U3 is switched to the debug channel BT _ DP/BT _ DN.
The analog switch U3 is configured to switch to the audio channel LINE _ R/LINE _ L when the first input/output pin GPIO1 outputs a high level and the second input/output pin GPIO2 outputs a low level. That is, in the third combined state, the analog changeover switch U3 is switched to the audio channels LINE _ R/LINE _ L.
In this embodiment, the main control chip U1 can control the first input/output pin GPIO1 and the second input/output pin GPIO2 to output the voltage level through the truth table, thereby controlling the analog switch U3. IN1 and IN2 are control terminals of the analog switch U3, IN1 is connected to the first input/output pin GPIO1, and receives the level output by the first input/output pin GPIO 1; the IN2 is connected to the second input/output pin GPIO2, and receives the level output from the second input/output pin GPIO 2. The truth table of the main control chip output is shown in the following table.
Figure DEST_PATH_254722DEST_PATH_IMAGE001
Where 1 indicates high level and 0 indicates low level. Thus, the master control chip U1 detects the interrupt event and switches the DP/DN of the USB interface J1 to the corresponding channel by time-division multiplexing following the corresponding timing sequence.
The working principle of the three switching situations of this implementation is described below with reference to practical requirements.
And (4) charging function: the product is inserted into the USB charging 1S, the main control chip detects a 5V power input event, triggers a charging interruption event, and connects IN 1-1, IN 2-1, DP/DN of the locking analog switch U3 and the charging chip CHG _ DP/CHG _ DN.
Debugging functions: after the product is inserted into the USB line 1S, and the main control chip detects that the key K1 is pressed for 3S, the debugging mode interruption event is triggered, IN 1-0 and IN 2-1 are used for switching the DP/DN of the analog switch U3 to the BT _ DP/BT _ DN channel of the main control chip. At the moment, the product can realize the functions of burning and debugging through the USB port.
Wired audio functions: the LINE-IN LINE is inserted IN a product working mode, the main control chip detects the LINE-IN LINE insertion, generates a wired audio interrupt event, and switches DP/DN of IN 1-1, IN 2-0 and the analog switch U3 to a wired audio channel LINE _ R/LINE _ L. External wired audio signals are transmitted to the main control chip through the USB port DP/DN, and the audio signals are played from the loudspeaker after being processed by the main control.
Therefore, in the embodiment, by setting the analog switch U3 and applying the time division multiplexing technology, the DP/DN channel resources of the USB interface are reasonably distributed, so that the charging, debugging and wired audio functions of the system can be reasonably realized, and the problems of conflict among a plurality of USB devices and insufficient resources of the USB port are solved.
The embodiment of the utility model also discloses an audio device, which comprises: the switching circuit based on the USB interface is the switching circuit in the embodiment, and the audio module is connected with the main control chip. Specifically, the audio device may be a playing device such as a headphone or a sound box. The audio module is a loudspeaker for playing sound.
Through implementing this embodiment, connect the USB interface with the simulation change over switch, main control chip utilizes input/output pin control simulation change over switch, and the simulation change over switch sets up charging channel, debugging passageway and audio channel, and main control chip detects the interrupt event, switches to different passageways according to the interrupt event control simulation change over switch of difference, from this, has realized the multiplexing of USB interface, has saved USB interface resource, avoids the conflict of USB equipment, has realized upgrading the debugging in audio equipment, has charged and has listened and the function of wired audio frequency.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the utility model, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

Claims (10)

1. A switching circuit based on a USB interface, comprising:
the main control chip comprises a debugging pin, an audio pin and an input/output pin;
the charging chip is connected with the main control chip;
the simulation change over switch is used for being connected with the USB interface, the simulation change over switch with the input/output pin is connected, the simulation change over switch includes:
the charging channel is connected with the charging chip;
the debugging channel is connected with the debugging pin;
the audio channel is connected with the audio pin;
the main control chip is used for controlling the analog selector switch to be switched to the charging channel or the debugging channel or the audio channel through the input and output pin according to a preset interrupt event.
2. The switching circuit according to claim 1, wherein the main control chip is configured to connect to a USB interface, the preset interrupt event includes the main control chip detecting an external power input, and the main control chip is further configured to control the analog switch to the charging channel when detecting the external power input.
3. The switching circuit according to claim 2, wherein the predetermined interrupt event further includes the main control chip detecting a key trigger signal, and the main control chip is further configured to control the analog switch to the debug channel when the key trigger signal is detected.
4. The switching circuit according to claim 3, further comprising a key module, wherein the key module comprises a key and a pull-up resistor, the key is connected to the main control chip, and the pull-up resistor is connected between the key and the main control chip to provide a pull-up voltage.
5. The switching circuit according to claim 3, wherein the predetermined interrupt event further comprises the main control chip detecting a LINE-IN access signal, and the main control chip is further configured to control the analog switch to the audio channel when detecting the LINE-IN access signal.
6. The switching circuit according to any one of claims 1 to 5, wherein the main control chip comprises a first input/output pin and a second input/output pin for outputting a high level or a low level, and the analog switch is configured to switch to the charging channel or the debugging channel or the audio channel according to a combination of the high level or the low level output by the first input/output pin and the second input/output pin.
7. The switching circuit according to claim 6, wherein the analog switch is configured to switch to the charging channel when both the first input/output pin and the second input/output pin output a high level.
8. The switching circuit according to claim 7, wherein the analog switch is configured to switch to the debug channel when the first input/output pin outputs a low level and the second input/output pin outputs a high level.
9. The switching circuit according to claim 8, wherein the analog switch is configured to switch to the audio channel when the first input/output pin outputs a high level and the second input/output pin outputs a low level.
10. An audio device, comprising: the switching circuit based on the USB interface is the switching circuit of any one of the claims 1 to 9, and the audio module is connected with the main control chip.
CN202121618813.9U 2021-07-15 2021-07-15 Switching circuit based on USB interface and audio equipment Active CN215895451U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202121618813.9U CN215895451U (en) 2021-07-15 2021-07-15 Switching circuit based on USB interface and audio equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202121618813.9U CN215895451U (en) 2021-07-15 2021-07-15 Switching circuit based on USB interface and audio equipment

Publications (1)

Publication Number Publication Date
CN215895451U true CN215895451U (en) 2022-02-22

Family

ID=80562190

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202121618813.9U Active CN215895451U (en) 2021-07-15 2021-07-15 Switching circuit based on USB interface and audio equipment

Country Status (1)

Country Link
CN (1) CN215895451U (en)

Similar Documents

Publication Publication Date Title
CN101931674B (en) Method and device for sharing Micro-USB interface
CN108666826B (en) Adapter, terminal equipment and adapter system
CN107257963B (en) Connector for audio data transmission
CN102572352B (en) HDMI multiplexing method, HDMI, and equipped provided with HDMI
CN109660913B (en) Terminal, terminal peripheral, signal transmission system and signal sending and receiving method
CN105120404A (en) Audio equipment, terminal equipment and electronic equipment
CN102082846B (en) Terminal equipment with plurality of externally arranged shared interfaces
CN107643994B (en) Terminal, terminal peripheral, signal sending and receiving method and data transmission system
CN109660894B (en) Terminal peripheral and audio signal transmission method
WO2012009984A1 (en) Method and device for sharing micro-usb interface between earphone and usb
CN201805529U (en) Earphone interface shared by serial port download line and earphone, and mobile terminal shared thereby
CN108733609B (en) Switching circuit, intelligent switching device and switching method of double USB interfaces
CN102158575A (en) Method for expanding USB (Universal Serial Bus) interface of mobile terminal into earphone interface
CN201919041U (en) Terminal equipment with plurality of peripheral sharing interfaces
CN101350989B (en) Plug adapter for a mobile terminal
CN103888873A (en) Electronic device and UART output system and method
CN110247265B (en) Multifunctional data line, switching circuit and switching method
CN215895451U (en) Switching circuit based on USB interface and audio equipment
CN217880302U (en) TYPE-C interface circuit
CN203632848U (en) Handheld electronic device
CN103312842B (en) For the terminal of annex detection and control, annex and system
CN105512067A (en) Mobile terminal, port reuse circuit thereof and method
CN216210995U (en) Innovative USB interface time-sharing multiplexing circuit
CN201919042U (en) Analog switch control circuit and mobile phone
CN115494972B (en) KVM switch with data cross copy function

Legal Events

Date Code Title Description
GR01 Patent grant
GR01 Patent grant