CN106788361B - MCU long-press reset circuit - Google Patents
MCU long-press reset circuit Download PDFInfo
- Publication number
- CN106788361B CN106788361B CN201710208206.7A CN201710208206A CN106788361B CN 106788361 B CN106788361 B CN 106788361B CN 201710208206 A CN201710208206 A CN 201710208206A CN 106788361 B CN106788361 B CN 106788361B
- Authority
- CN
- China
- Prior art keywords
- resistor
- mcu
- triode
- circuit
- key
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03K—PULSE TECHNIQUE
- H03K17/00—Electronic switching or gating, i.e. not by contact-making and –breaking
- H03K17/22—Modifications for ensuring a predetermined initial state when the supply voltage has been applied
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03K—PULSE TECHNIQUE
- H03K17/00—Electronic switching or gating, i.e. not by contact-making and –breaking
- H03K17/22—Modifications for ensuring a predetermined initial state when the supply voltage has been applied
- H03K2017/226—Modifications for ensuring a predetermined initial state when the supply voltage has been applied in bipolar transistor switches
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Push-Button Switches (AREA)
- Electronic Switches (AREA)
Abstract
The invention discloses a long-press reset circuit of an MCU, comprising: a short press indication circuit and an MCU reset circuit; the short press indication circuit comprises: the LED comprises a resistor R1, a resistor R2, a resistor R3, a light-emitting diode D1 and a triode Q1; the MCU reset circuit includes: triode Q2, mutual parallelly connected resistance R4 and R5 are connected to triode Q2's base, and R4 ground connection, R5 are connected the power through button KEY, and the MCU earthing terminal is connected to Q2's projecting pole, and Q2's collecting electrode passes through resistance R6 and connects the power, is connected with resistance R2 through resistance R7, through parallel circuit resistance R8, diode D2 and parallel circuit electric capacity C1, electric capacity C2 are connected, electric capacity C1, C2 are connected with the MCU earthing terminal, MCU's RST pin is connected to parallel circuit resistance R8, diode D2's output. The invention realizes the reset of the MCU through the long key, reliably separates the short key and the long key, and processes different tasks through the same key and by adopting different key time.
Description
Technical Field
The invention relates to the technical field of MCU control, in particular to an MCU long-press reset circuit.
Background
The development of science and technology in the current society is new and different day by day, new science and technology emerges endlessly, and a single chip Microcomputer (MCU) emerges in the end of the 20 th century 70 s and is counted as old science and technology, but the science and technology is old and has no sign of being eliminated, but is vigorous. The reason is that the single chip microcomputer is popular in the electronic consumption market mainly because of the advantages of high integration level, small size, high reliability, strong control function, low voltage, low power consumption, convenience in producing portable products, excellent cost performance, easiness in expansion and the like.
The single chip microcomputer is Reset (RST) when the single chip microcomputer is used, the single chip microcomputer needs to be reset when various exceptions such as program runaway, abnormal power failure and program blocking happen, and otherwise, the situation that faults are difficult to remove occurs. The reset circuit that uses usually adopts the direct RST pin that directly pulls up or gets off with MCU in order to reach the purpose that resets more, can realize the function and use less components and parts certainly in simpler occasion, however, when need be used for this trigger signal simultaneously to trigger two circuits of other circuits and MCU, then can not realize the control to single circuit, because if the trigger of these two functions is same trigger source, two actions take place simultaneously, can't reach the requirement of controlling another circuit and not triggering MCU and reset, consequently, prior art needs to improve.
Disclosure of Invention
The embodiment of the invention aims to solve the technical problem that: the MCU long-press reset circuit is provided to solve the problems in the prior art.
According to an aspect of the embodiments of the present invention, there is provided an MCU long press reset circuit, including:
a short press indication circuit and an MCU reset circuit;
the short press indication circuit comprises: the LED driving circuit comprises a resistor R1, a resistor R2, a resistor R3, a light emitting diode D1 and a triode Q1, wherein the resistor R2 is connected with the base electrode of the triode Q1, one end of the resistor R1 is connected with a power supply, the other end of the resistor R1 is connected with the light emitting diode D1 in series and then connected onto the collector electrode of the triode Q1, the resistor R3 is connected with the emitting electrode of the triode Q1, and the other end of the resistor R3 is connected with the grounding end of an MCU;
the MCU reset circuit includes: the triode Q2, the base of the triode Q2 is connected with a resistor R4 and a resistor R5, the resistor R4 and the resistor R5 are connected in parallel, the resistor R4 is grounded, the resistor R5 is connected with a KEY, the other end of the KEY is connected with a power supply, the emitter of the triode Q2 is connected with an MCU (microprogrammed control unit) grounding end, the collector of the triode Q2 is connected with the power supply through a resistor R6, the collector of the triode Q2 is connected with the resistor R2 through a resistor R7, the base of the triode Q1 is connected with the collector of the triode Q2, the collector of the triode Q2 is connected with a parallel circuit capacitor C1 and a capacitor C2 through a parallel circuit resistor R8 and a diode D2, the capacitors C1 and C2 are connected with the MCU grounding end, and the output ends of the parallel circuit resistor R8 and the diode D2 are connected with the RST pin of the MCU;
and the MCU grounding end is grounded through a resistor R9.
In another embodiment of the MCU long press reset circuit according to the present invention, the resistor R9 is 0 ohm.
In another embodiment of the MCU long-press reset circuit according to the present invention, when the KEY is pressed for a short time, the transistor Q2 of the MCU reset circuit is turned on, so that the transistor Q1 of the short-press indication circuit is turned on, the light emitting diode D1 is turned on, the collector parallel circuit resistor R8 of the transistor Q2 and the output terminal of the diode D2 make the falling amplitude of the RST pin of the MCU insufficient to trigger the MCU to reset, and the MCU does not reset.
In another embodiment of the MCU long-press reset circuit according to the present invention, when the KEY is pressed for a long time, the light emitting diode D1 is turned on, and the capacitor C1 discharges for a long time through the resistor R8 and the transistor Q2, and the collector of the transistor Q2 is connected in parallel to the resistor R8 and the output of the diode D2, so that the level of the RST pin of the MCU is lowered to trigger the MCU to reset, and the MCU resets.
In another embodiment of the MCU long-press reset circuit according to the present invention, when the KEY is released, the power supply rapidly charges the capacitor C2 through the resistor R6 and the diode D2, the RST pin of the MCU rapidly returns to the power level, and the MCU normally operates.
In another embodiment of the MCU long press reset circuit according to the present invention, the resistor R6 is 1M ohm.
Compared with the prior art, the invention has the following advantages:
according to the invention, the two tasks are separated by different key durations, the indicator light is lightened by pressing the key for a short time, the MCU is reset by pressing the key for a long time, the short-press key and the long-press key are reliably separated, and different tasks are processed by adopting different key pressing times through the same key.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, a brief description will be given below of the drawings used in the description of the embodiments or the prior art, 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 is a flow diagram of one embodiment of an MCU hold reset circuit of the present invention.
In the figure: 1 short press indicating circuit and 2 MCU reset circuit.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, 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 only a part of the embodiments of the present invention, and not all of the embodiments. 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.
The MCU long press reset circuit provided by the present invention will be described in more detail with reference to the accompanying drawings and embodiments.
Fig. 1 is a flowchart of an embodiment of the MCU hold-down reset circuit of the present invention, and as shown in fig. 1, the MCU hold-down reset circuit of this embodiment includes:
a short press indication circuit 1 and an MCU reset circuit 2;
the short press indication circuit 1 includes: the LED driving circuit comprises a resistor R1, a resistor R2, a resistor R3, a light emitting diode D1 and a triode Q1, wherein the resistor R2 is connected with the base electrode of the triode Q1, one end of the resistor R1 is connected with a power supply, the other end of the resistor R1 is connected with the light emitting diode D1 in series and then connected onto the collector electrode of the triode Q1, the resistor R3 is connected with the emitting electrode of the triode Q1, and the other end of the resistor R3 is connected with the grounding end of an MCU;
the MCU reset circuit 2 includes: the triode Q2, the base of the triode Q2 is connected with a resistor R4 and a resistor R5, the resistor R4 is connected with the resistor R5 in parallel, the resistor R4 is grounded, the resistor R5 is connected with a KEY KEY, the other end of the KEY KEY is connected with a power supply, the emitter of the triode Q2 is connected with an MCU ground terminal, the collector of the triode Q2 is connected with the power supply through a resistor R6, the collector of the triode Q2 is connected with the resistor R2 through a resistor R7, the base of the triode Q1 is connected with the collector of the triode Q2, the collector of the triode Q2 is connected with a parallel circuit capacitor C1 and a capacitor C2 through a parallel circuit resistor R8 and a diode D2, the capacitors C1 and C2 are connected with the MCU ground terminal, and the output ends of the parallel circuit resistor R8 and the diode D2 are connected with the RST pin of the MCU;
a collector of the triode Q2 is arranged to pass through a parallel circuit resistor R8 and an output end of the diode D2 to be a first node;
and the MCU grounding end is grounded through a resistor R9.
The resistor R9 is 0 ohm, and the resistor R6 is 1M ohm.
When the circuit is in a steady state, the level of the node RST is power supply voltage, the MCU is in a normal working state, the first node is also in the power supply level, the triode Q2 is not conducted, and the light-emitting diode D1 does not emit light;
when the KEY is pressed for a short time, the triode Q2 of the MCU reset circuit 2 is conducted, so that the triode Q1 of the short-press indicating circuit 1 is conducted, the light-emitting diode D1 is bright, the collector of the triode Q2 is connected with the circuit resistor R8 in parallel and the output end of the diode D2, the descending amplitude of the RST pin of the MCU is insufficient to trigger the MCU to reset, and the MCU does not reset;
when the KEY is pressed for a short time, the positive electrode of the power supply is connected to the base electrode of the triode Q1, so that the triode Q1 is conducted, the voltage of the first node is pulled down, the emitter of the triode Q1 is biased positively, and the triode Q2 is conducted, so that the light emitting diode D1 emits light; in the process of pressing the key, the capacitor C2 discharges to the ground through the resistor R6 and the triode Q2, so that the potential of the node RST is slowly reduced from the original power supply voltage, but the short pressing time is not enough to reduce the potential of the RST to the extent of triggering the MCU to reset, and the MCU cannot be triggered to reset by pressing the key for a short time.
When the KEY is pressed for a long time, the light-emitting diode D1 is conducted, the discharging time of the capacitor C1 through the resistor R8 and the triode Q2 is long enough, the collector of the triode Q2 is connected with the output end of the resistor R8 and the diode D2 in parallel, the RST pin level of the MCU is reduced to trigger the MCU to reset, and the MCU resets.
When the KEY is released, the power supply rapidly charges the capacitor C2 through the resistor R6 and the diode D2, the RST pin of the MCU rapidly returns to the power level, and the MCU normally works.
The MCU long press reset circuit provided by the present invention is described in detail above, and the principle and the implementation of the present invention are explained in this document by applying specific examples, and the description of the above examples is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.
Finally, it should be noted that: although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still make modifications to the technical solutions described in the foregoing embodiments, or make equivalent substitutions and improvements to part of the technical features of the foregoing embodiments, and any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (6)
1. An MCU long press reset circuit, comprising: a short press indication circuit and an MCU reset circuit;
the short press indication circuit comprises: the LED driving circuit comprises a resistor R1, a resistor R2, a resistor R3, a light emitting diode D1 and a triode Q1, wherein the resistor R2 is connected with the base electrode of the triode Q1, one end of the resistor R1 is connected with a power supply, the other end of the resistor R1 is connected with the light emitting diode D1 in series and then connected onto the collector electrode of the triode Q1, the resistor R3 is connected with the emitting electrode of the triode Q1, and the other end of the resistor R3 is connected with the grounding end of an MCU;
the MCU reset circuit includes: the triode Q2, the base of the triode Q2 is connected with a resistor R4 and a resistor R5, the resistor R4 is connected with the resistor R5 in parallel, the resistor R4 is grounded, the resistor R5 is connected with a KEY KEY, the other end of the KEY KEY is connected with a power supply, the emitter of the triode Q2 is connected with an MCU ground terminal, the collector of the triode Q2 is connected with the power supply through a resistor R6, the collector of the triode Q2 is connected with the resistor R2 through a resistor R7, the base of the triode Q1 is connected with the collector of the triode Q2, the collector of the triode Q2 is connected with a parallel circuit capacitor C1 and a capacitor C2 through a parallel circuit resistor R8 and a diode D2, the capacitors C1 and C2 are connected with the MCU ground terminal, and the output ends of the parallel circuit resistor R8 and the diode D2 are connected with the RST pin of the MCU;
the MCU grounding end is grounded through a resistor R9.
2. The circuit of claim 1, wherein the resistor R9 is 0 ohms.
3. The circuit of claim 1, wherein when the KEY is pressed for a short time, the transistor Q2 of the MCU reset circuit is turned on, so that the transistor Q1 of the short-press indication circuit is turned on, the light emitting diode D1 is turned on, the collector parallel circuit resistor R8 of the transistor Q2 and the output terminal of the diode D2 enable the RST pin of the MCU to be dropped by an amount insufficient to trigger the MCU reset, and the MCU is not reset.
4. The circuit of claim 1, wherein when the KEY is pressed for a long time, the light emitting diode D1 is turned on, and the capacitor C1 is discharged through the parallel circuit resistor R8 and the transistor Q2 for a long enough time, the collector parallel circuit resistor R8 of the transistor Q2 and the output terminal of the diode D2 make the level of the RST pin of the MCU drop to trigger the MCU reset, and the MCU reset.
5. The circuit according to claim 1, wherein when the KEY is released, the power supply rapidly charges the capacitor C2 through the resistor R6 and the diode D2, the RST pin of the MCU rapidly returns to the power supply level, and the MCU operates normally.
6. The circuit according to any one of claims 1 to 5, wherein the resistor R6 is 1M ohm.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710208206.7A CN106788361B (en) | 2017-03-31 | 2017-03-31 | MCU long-press reset circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710208206.7A CN106788361B (en) | 2017-03-31 | 2017-03-31 | MCU long-press reset circuit |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106788361A CN106788361A (en) | 2017-05-31 |
CN106788361B true CN106788361B (en) | 2023-04-11 |
Family
ID=58965692
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710208206.7A Active CN106788361B (en) | 2017-03-31 | 2017-03-31 | MCU long-press reset circuit |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106788361B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108153402B (en) * | 2017-12-13 | 2021-06-01 | 安徽皖通邮电股份有限公司 | Method for identifying long-press and short-press reset keys |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201789480U (en) * | 2010-09-02 | 2011-04-06 | 中兴通讯股份有限公司 | Circuit reusing power on/off key for realizing reset function and portable mobile terminal |
CN104020705A (en) * | 2014-06-23 | 2014-09-03 | 苏州塔可盛电子科技有限公司 | Power monitoring circuit with resetting function |
WO2016112744A1 (en) * | 2015-01-15 | 2016-07-21 | 无锡职业技术学院 | Anti-latch-up effect microprocessor reset circuit |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102868387B (en) * | 2012-09-12 | 2015-09-30 | 广东欧珀移动通信有限公司 | A kind of level saltus step reset IC design circuit |
-
2017
- 2017-03-31 CN CN201710208206.7A patent/CN106788361B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201789480U (en) * | 2010-09-02 | 2011-04-06 | 中兴通讯股份有限公司 | Circuit reusing power on/off key for realizing reset function and portable mobile terminal |
CN104020705A (en) * | 2014-06-23 | 2014-09-03 | 苏州塔可盛电子科技有限公司 | Power monitoring circuit with resetting function |
WO2016112744A1 (en) * | 2015-01-15 | 2016-07-21 | 无锡职业技术学院 | Anti-latch-up effect microprocessor reset circuit |
Also Published As
Publication number | Publication date |
---|---|
CN106788361A (en) | 2017-05-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106788361B (en) | MCU long-press reset circuit | |
CN103823540A (en) | Starting-up control circuit | |
CN101290643B (en) | System for forbidding remote computer boot-strap | |
CN202305717U (en) | AC power failure quick detection circuit | |
CN102868387A (en) | Level jump reset IC (integrated circuit) design circuit | |
JP2013054815A (en) | Electric circuit for pilot lamp of hard disc device | |
CN104349528B (en) | LED status display system | |
US20150015067A1 (en) | Control circuit and electronic device using same | |
CN110190841A (en) | I/O port multiplexing control circuit and electronic equipment | |
CN108279361A (en) | A kind of test method and test circuit of the charging port of intelligent terminal | |
CN204258757U (en) | A kind of reset circuit being applicable to fpga chip | |
CN101877923B (en) | Led drive circuit | |
CN102694541A (en) | Self-locking loop circuit | |
CN206790463U (en) | MCU long-press reset circuits | |
CN210405258U (en) | Automatic starting circuit for computer incoming call | |
CN111398852A (en) | Power output short circuit detection circuit and electronic equipment | |
CN213754479U (en) | Combination key reset circuit of handheld device and device thereof | |
CN112486060B (en) | Reset circuit, circuit board and electronic product of singlechip | |
CN212622777U (en) | Voltage drop detection circuit and electronic device | |
CN216390965U (en) | Multiplexing circuit and electronic equipment | |
CN202424105U (en) | Short-circuit protection circuit | |
CN211857667U (en) | Undervoltage alarm circuit and power supply circuit with undervoltage alarm circuit | |
CN114675732B (en) | Reset circuit, electronic equipment and reset system | |
CN213518192U (en) | Current suppression device for storage system | |
CN211018784U (en) | Time delay circuit and electronic device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information |
Address after: 523000 Tongsha New Industrial Park, Dongcheng Street, Dongguan City, Guangdong Province Applicant after: Guangdong Boliwei Technology Co.,Ltd. Address before: 523000 Tongsha New Industrial Park, Dongcheng District, Dongcheng District, Dongguan City, Guangdong Province Applicant before: DONGGUAN GREENWAY BATTERY Co.,Ltd. |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |