A circuit, device and method supporting software burning and power output

By designing circuits that support software programming and power output, and utilizing the switching functions of the microcontroller unit and the state switching module, the problems of appearance impact and low efficiency during the upgrade of USB interface devices are solved, enabling the multi-functional use of the USB interface.

CN117234534BActive Publication Date: 2026-08-04SHENZHEN AIPER INTELLIGENT CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN AIPER INTELLIGENT CO LTD
Filing Date
2022-06-08
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

Upgrading existing USB interface devices typically requires additional interfaces or disassembly, which affects appearance, is inefficient, and poses a risk of product damage.

Method used

Design a circuit that supports software programming and power output, including a microcontroller unit, a USB interface, and a state switching module. The microcontroller unit controls the state switching module to switch between discharging and data transmission states, so that the USB interface can both output power and transmit data.

Benefits of technology

This invention enables the USB interface to both charge external devices and perform software programming of internal ICs, eliminating the need for additional interfaces, improving upgrade efficiency, and reducing the risk of damage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117234534B_ABST
    Figure CN117234534B_ABST
Patent Text Reader

Abstract

The application discloses a circuit and method for supporting software burning and power output, wherein a control output end and a data input end of a micro control unit are connected with a control input end of a state switching module; when the micro control unit receives a discharge signal, the micro control unit outputs a discharge control signal to the state switching module through the control output end, so that the state switching module enters an output state, and voltage and current input from a power source are output to a USB interface to charge external equipment; when the micro control unit receives a data transmission signal, the micro control unit outputs the data transmission signal to the state switching module through the control output end, so that the state switching module enters a data transmission state, and data coming to the USB interface is output to the micro control unit after being converted by the state switching module, data burning and upgrading of the micro control unit are realized, and the USB interface can be used for power output and software burning of internal ICs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of USB interface technology, and in particular to a circuit, device, and method that supports software programming and power output. Background Technology

[0002] USB (Universal Serial Bus) is an external bus standard typically used for connecting and communicating between computers and external devices. Therefore, devices with USB interfaces are primarily used to output voltage and current to power external devices such as mobile phones and tablets. Alternatively, in some electronic products with built-in power supplies, the USB interface is also used as a charging port.

[0003] However, when these devices with USB interfaces require software upgrades, the only methods typically involve adding an extra interface or disassembling the device and flashing the software. These upgrade methods not only affect the product's appearance but are also inefficient, pose a risk of damaging the product, and result in additional costs. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to provide a circuit, device and method that supports software programming and power output, so that the USB interface can be used for power output and also for programming software for internal ICs.

[0005] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: A circuit that supports software programming and power output includes a microcontroller unit, a USB interface, and a state switching module; The control output terminal of the microcontroller unit is connected to the control input terminal of the state switching module; The state switching module includes a power input terminal; The data transmission end of the USB interface is connected to the data transmission end of the state switching module; The power transmission terminal of the USB interface is connected to the power output terminal of the state switching module.

[0006] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is as follows: A device that supports software programming and power output includes the circuit described above that supports software programming and power output.

[0007] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is as follows: A method for supporting software programming and power output includes the aforementioned circuit for supporting software programming and power output. The method includes the following steps: The microcontroller receives discharge signals and data transmission signals. The microcontroller unit determines whether it has received the discharge signal or the data transmission signal; If the discharge signal is received, the state switching module is controlled to switch to the discharge state, and power is output through the power transmission terminal of the USB interface. If the data transmission signal is received, the state switching module is controlled to switch to the data transmission state, and data is input through the data transmission terminal of the USB interface.

[0008] The beneficial effects of this invention are as follows: By connecting the control output terminal and data input terminal of the microcontroller unit to the control input terminal of the state switching module, when the microcontroller unit receives a discharge signal, it outputs a discharge control signal to the state switching module through its control output terminal, causing the state switching module to enter the output state and output the voltage and current input from the power supply to the USB interface to charge external devices; when the microcontroller unit receives a data transmission signal, it outputs a data transmission signal to the state switching module through its control output terminal, causing the state switching module to enter the data transmission state, and the data from the USB interface is converted by the state switching module before being output to the microcontroller unit, thereby realizing the data programming and upgrading of the microcontroller unit. Thus, the USB interface can be used for both power output and for programming software for the internal IC. Attached Figure Description

[0009] Figure 1 This is a schematic diagram of a circuit that supports software programming and power output in an embodiment of the present invention; Figure 2 This is another schematic diagram of a circuit that supports software burning and power output in an embodiment of the present invention; Label Explanation 1. Microcontroller unit; 2. USB interface; 3. State switching module; 31. Digital conversion module; 32. Buck module; IC1. Buck chip; IC2. Digital conversion chip; L1. First inductor; R1. First resistor; C1. First capacitor. Detailed Implementation

[0010] To explain in detail the technical content, objectives, and effects of the present invention, the following description is provided in conjunction with the embodiments and accompanying drawings.

[0011] Please refer to Figure 1 A circuit that supports software programming and power output includes a microcontroller unit, a USB interface, and a state switching module. The control output terminal of the microcontroller unit is connected to the control input terminal of the state switching module; The state switching module includes a power input terminal; The data transmission end of the USB interface is connected to the data transmission end of the state switching module; The power transmission terminal of the USB interface is connected to the power output terminal of the state switching module.

[0012] As described above, the beneficial effects of this invention are as follows: By connecting the control output terminal and data input terminal of the microcontroller unit to the control input terminal of the state switching module, when the microcontroller unit receives a discharge signal, it outputs a discharge control signal to the state switching module through its control output terminal, causing the state switching module to enter the output state and output the voltage and current input from the power supply to the USB interface to charge external devices; when the microcontroller unit receives a data transmission signal, it outputs a data transmission signal to the state switching module through its control output terminal, causing the state switching module to enter the data transmission state, and the data from the USB interface is converted by the state switching module before being output to the microcontroller unit, thereby realizing the data programming and upgrading of the microcontroller unit, thus achieving the effect that the USB interface can be used for both power output and for programming software for the internal IC.

[0013] Furthermore, the state switching module includes a digital conversion module; The first control output terminal of the microcontroller is connected to the control input terminal of the digital conversion module; The first data transmission terminal of the digital conversion module is connected to the data transmission terminal of the microcontroller unit; The data transmission end of the USB interface is connected to the second data transmission end of the digital conversion module.

[0014] As described above, the state switching module includes a digital conversion module, which connects the first control output terminal of the microcontroller unit to the control input terminal of the digital conversion module. This allows the microcontroller unit to output control signals to switch the usage state of the digital conversion module, thereby enabling data transmission.

[0015] Furthermore, the digital conversion module includes a digital conversion chip; The digital conversion chip includes a USB data pin, a data transmission pin, and an enable switching terminal; The USB data pin serves as the second data transmission terminal of the digital conversion module and is connected to the data transmission terminal of the USB interface. The enable switching pin is connected to the first control output of the microcontroller unit as the control input terminal of the digital conversion module. The data transmission pin serves as the first data transmission terminal of the digital conversion module and is connected to the data transmission terminal of the microcontroller unit.

[0016] As described above, by using the USB data pin, data transmission pin, and enable switching terminal of the digital converter chip to realize data transmission with the USB interface, data transmission with the microcontroller, and receiving control signals sent by the microcontroller, the software of the microcontroller can be programmed and upgraded according to the control signals.

[0017] Furthermore, the model of the digital conversion chip includes BL1530.

[0018] As can be seen from the above description, using digital conversion chips, including the BL1530, as digital conversion modules provides a variety of alternative options, which is more conducive to device selection.

[0019] Furthermore, the state switching module includes a buck module; The power transmission terminal of the USB interface is connected to the power output terminal of the step-down module. The second control output terminal of the microcontroller is connected to the control input terminal of the buck module; The power input terminal of the step-down module is used to connect to a power source.

[0020] As described above, the state switching module includes a step-down module and connects the second control output terminal of the microcontroller unit to the control input terminal of the step-down module, thereby enabling the microcontroller unit to output control signals to switch the operating state of the step-down module and realize the power output function.

[0021] Furthermore, the step-down module includes a step-down chip; The step-down chip includes a power input pin, a power output pin, and an enable control pin; The power input pin serves as the power input terminal of the step-down module for connection to a power source. The power output pin serves as the power output terminal of the step-down module and is connected to the power transmission terminal of the USB interface. The enable control pin serves as the control input terminal of the buck module and is connected to the second control output terminal of the microcontroller unit.

[0022] As described above, by using the power input pin, power output pin, and enable control pin of the step-down chip to respectively implement the input of external power, the output of external power to the USB port after stepping down, and the reception of control signals sent by the microcontroller, the power output can be used to supply power to other devices according to the control signals.

[0023] Furthermore, the buck chip model includes IP6525T.

[0024] As can be seen from the above description, using step-down chips, including the IP6525T, as step-down modules provides a variety of alternative options, which is more conducive to device selection.

[0025] Furthermore, it also includes batteries; The battery is connected to the power input terminal of the state switching module.

[0026] As described above, by adding a battery, the circuit does not need to add other interfaces or wiring for connecting to external power devices, thus enabling the circuit to directly power external charging devices through its own battery.

[0027] Another embodiment of the present invention provides a method for supporting software programming and power output, including the circuit described above for supporting software programming and power output, the method comprising the following steps: The microcontroller receives discharge signals and data transmission signals. The microcontroller unit determines whether it has received the discharge signal or the data transmission signal; If the discharge signal is received, the state switching module is controlled to switch to the discharge state, and power is output through the power transmission terminal of the USB interface. If the data transmission signal is received, the state switching module is controlled to switch to the data transmission state, and data is input through the data transmission terminal of the USB interface.

[0028] The circuit and device of the present invention, which supports software burning and power output, can provide charging services for terminals such as mobile phones through a USB interface, and can also upgrade the device itself through a USB interface. The following is a detailed description of the specific embodiments: Example 1 Please refer to Figure 1 A circuit that supports software programming and power output includes a microcontroller unit 1, a USB interface 2, and a state switching module 3. The control output terminal of the microcontroller unit 1 is connected to the control input terminal of the state switching module 3; the state switching module 3 includes a power input terminal; the data transmission terminals (USB-D+, USB-D-) of the USB interface 2 are connected to the data transmission terminals of the state switching module 3; the power transmission terminal (QC-OUT) of the USB interface 2 is connected to the power output terminal of the state switching module 3. Please refer to Figure 2 The state switching module 3 includes a digital conversion module 31 and a step-down module 32; The first control output terminal of the microcontroller unit 1 is connected to the control input terminal of the digital conversion module; the first data transmission terminal of the digital conversion module is connected to the data transmission terminal of the microcontroller unit 1; the data transmission terminal of the USB interface 2 is connected to the second data transmission terminal of the digital conversion module; wherein, the digital conversion module 31 includes a digital conversion chip IC2, the microcontroller unit 1 includes an MCU chip, and the MCU chip model includes STM8; the digital conversion chip IC2 is used to decode USB protocol data into data that the MCU chip can recognize; the USB protocol signal input from the USB interface 2 is converted into an MCU protocol signal through the data transmission terminal of the digital conversion module 31, so that the MCU chip can recognize data signals of different protocols input from the USB interface 2, and realize functions such as software installation and software upgrade; The digital conversion chip IC2 includes USB data pins (USB-D+, USB-D-), data transmission pins (TR1, TX1), an enable switch (USB02-EN), and an enable switch (OEb). The USB data pins serve as the second data transmission terminal of the digital conversion module and are connected to the data transmission terminal of the USB interface 2. The enable switch pin serves as the control input terminal of the digital conversion module and is connected to the first control output terminal of the microcontroller unit 1. The data transmission pin serves as the first data transmission terminal of the digital conversion module and is connected to the data transmission terminal of the microcontroller unit 1. The enable switch is connected to the twentieth pin of the MCU chip. The power input terminal (pin 10) of the digital conversion chip IC2 is connected to the seventeenth pin of the MCU chip, and is powered by the MCU chip. In an optional embodiment, the model of the digital conversion chip IC2 includes BL1530. The power transmission terminal of the USB interface 2 is connected to the power output terminal of the buck module 32; the second control output terminal of the microcontroller unit 1 is connected to the control input terminal of the buck module 32; the power input terminal of the buck module 32 is used to connect to a power source; wherein, the buck module 32 includes a buck chip IC1; the buck chip IC1 is used to reduce the voltage (e.g., 220V) at the USB interface 2 to a voltage (e.g., 5V) that the external device to be charged can withstand; the buck chip IC1 includes a power input pin (BAT-IN), a power output pin, and an enable control pin; the power input pin serves as the power input terminal of the buck module 32 for connection to a power source; the power output pin serves as the power output terminal of the buck module 32 and is connected to the power transmission terminal of the USB interface 2; the enable control pin serves as the control input terminal of the buck module 32 and is connected to the second control output terminal of the microcontroller unit 1; in an optional embodiment, the buck chip IC1 may be of model IP6525T; The step-down chip IC1 also includes USB data transmission pins (USB-D+, USB-D-); the USB data transmission pins of the step-down chip IC1 are connected to the data transmission terminal of the USB interface 2; the step-down chip IC1 and the digital converter chip IC2 are connected through their respective data exchange pins (QC-DP, QC-DM) for data exchange; by connecting the data transmission terminal of the USB interface 2 to the data transmission terminal of the digital converter module 31 and the data transmission terminal of the step-down module 32 respectively, both the digital converter module 31 and the step-down module 32 can obtain data from the USB port; In one optional embodiment, the circuit further includes a first inductor L1, a first resistor R1, and a first capacitor C1. One end of the first inductor L1 is connected to the power transmission terminal of the USB interface 2. The other end of the first inductor L1 is connected to one end of the first resistor R1 and the power output terminal of the step-down module 32. The other end of the first resistor R1 is connected to one end of the first capacitor C1. The other end of the first capacitor C1 is grounded. The circuit also includes other electronic components such as resistors and capacitors to ensure normal and stable operation. In another optional embodiment, the circuit further includes a battery. The battery is connected to the power input terminal of the state switching module 3. The first inductor L1, the first resistor R1, and the first capacitor C1 form a filtering circuit, which filters the voltage and current signals output by the step-down module, providing a more stable voltage and current to the USB interface and further outputting to external devices, thus providing good charging power.

[0029] Example 2 A method for supporting software programming and power output includes the circuit for supporting software programming and power output described in Embodiment 1. The method includes the following steps: The microcontroller receives discharge signals and data transmission signals. The microcontroller unit determines whether it has received the discharge signal or the data transmission signal; If the discharge signal is received, the state switching module is controlled to switch to the discharge state, and power is output through the power transmission terminal of the USB interface. If the data transmission signal is received, the state switching module is controlled to switch to the data transmission state, and data is input through the data transmission terminal of the USB interface; Specifically, the steps to achieve the discharge state are as follows: The first pin of the MCU chip is connected to a switch; the switch is used to receive a discharge signal; after receiving the discharge control signal, the switch sends a discharge signal to the first pin of the MCU chip, which is a high-level signal; after receiving the high-level signal, the second control output terminal (pin 33) of the MCU sends a low-level signal to the control input terminal (pin 2) of the buck converter IC1, and the first control output terminal (pin 6) of the MCU sends a low-level signal to the digital converter IC2 to make it enter the output state; at this time, the buck converter IC1 enters the power output state and outputs the battery's power to the USB interface 2 to charge external devices; Data burning status implementation steps: After the storage device containing the file to be programmed is connected to the USB interface 2, the MCU chip receives the data transmission signal and sends a high level to the step-down chip IC1 through its second control output terminal to put it into input state; it also sends a high level to the digital converter chip IC2 through its first control output terminal to put it into input state. Then, the storage device containing the file to be programmed transmits the programming signal to the digital converter chip IC2 through the data transmission terminals (USB-D+, USB-D-) of the USB interface 2. After receiving the programming signal, the digital converter chip IC2 transmits the programming signal to the MCU chip through its data transmission pins (TR1, TX1). At this time, the MCU chip enters the programming state. After the programming data is transmitted from the storage device containing the file to be programmed to the digital converter chip IC2 through the data transmission terminals (USB-D+, USB-D-) of the USB interface 2, the digital converter chip IC2 decodes the programming data into a data format compatible with the MCU chip and then programs the decoded programming data into the MCU chip.

[0030] In summary, the circuit, device, and method provided by this invention, which supports software programming and power output, connects the control output terminal and data input terminal of a microcontroller unit (MCU) to the control input terminal of a state switching module. When the MCU receives a discharge signal, it outputs a discharge control signal to the state switching module through its control output terminal, causing the state switching module to enter the output state and output the voltage and current from the power input to the USB interface to charge external devices. When the MCU receives a data transmission signal, it outputs a data transmission signal to the state switching module through its control output terminal, causing the state switching module to enter the data transmission state. Data from the USB interface is converted by the state switching module before being output to the MCU, thus enabling data programming and upgrading of the MCU. This allows the USB interface to be used for both power output and software programming of internal ICs.

[0031] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent modifications made based on the content of the present invention's specification and drawings, or direct or indirect applications in related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A circuit supporting software programming and power output, characterized in that, It includes a microcontroller unit, a USB interface, and a state switching module, wherein the state switching module includes a digital conversion module; The control output terminal of the microcontroller unit is connected to the control input terminal of the state switching module; The state switching module includes a power input terminal; The data transmission end of the USB interface is connected to the data transmission end of the state switching module; The power transmission terminal of the USB interface is connected to the power output terminal of the state switching module. The first control output terminal of the microcontroller is connected to the control input terminal of the digital conversion module; The first data transmission terminal of the digital conversion module is connected to the data transmission terminal of the microcontroller unit; The data transmission end of the USB interface is connected to the second data transmission end of the digital conversion module.

2. The circuit supporting software programming and power output according to claim 1, characterized in that, The digital conversion module includes a digital conversion chip; The digital conversion chip includes a USB data pin, a data transmission pin, and an enable switching terminal; The USB data pin serves as the second data transmission terminal of the digital conversion module and is connected to the data transmission terminal of the USB interface. The enable switching pin is connected to the first control output of the microcontroller unit as the control input terminal of the digital conversion module. The data transmission pin serves as the first data transmission terminal of the digital conversion module and is connected to the data transmission terminal of the microcontroller unit.

3. The circuit supporting software programming and power output according to claim 2, characterized in that, The model of the digital conversion chip includes BL1530.

4. The circuit supporting software programming and power output according to claim 1, characterized in that, The state switching module includes a step-down module; The power transmission terminal of the USB interface is connected to the power output terminal of the step-down module. The second control output terminal of the microcontroller is connected to the control input terminal of the buck module; The power input terminal of the step-down module is used to connect to a power source.

5. The circuit supporting software programming and power output according to claim 4, characterized in that, The step-down module includes a step-down chip; The step-down chip includes a power input pin, a power output pin, and an enable control pin; The power input pin serves as the power input terminal of the step-down module for connection to a power source. The power output pin serves as the power output terminal of the step-down module and is connected to the power transmission terminal of the USB interface. The enable control pin serves as the control input terminal of the buck module and is connected to the second control output terminal of the microcontroller unit.

6. The circuit supporting software programming and power output according to claim 5, characterized in that, The buck converter chip model includes IP6525T.

7. A circuit supporting software programming and power output according to any one of claims 1-6, characterized in that, It also includes batteries; The battery is connected to the power input terminal of the state switching module.

8. A device that supports software programming and power output, characterized in that, The circuit includes any one of claims 1-7 that supports software burning and power output.

9. A method for supporting software burning and power output, characterized in that, The method includes a circuit supporting software programming and power output as described in any one of claims 1-7, comprising the steps of: The microcontroller receives discharge signals and data transmission signals. The microcontroller unit determines whether it has received the discharge signal or the data transmission signal; If the discharge signal is received, the state switching module is controlled to switch to the discharge state, and power is output through the power transmission terminal of the USB interface. If the data transmission signal is received, the state switching module is controlled to switch to the data transmission state, and data is input through the data transmission terminal of the USB interface.