CN112269332B - Microcontroller system circuit and electronic device - Google Patents

Microcontroller system circuit and electronic device Download PDF

Info

Publication number
CN112269332B
CN112269332B CN202011049718.1A CN202011049718A CN112269332B CN 112269332 B CN112269332 B CN 112269332B CN 202011049718 A CN202011049718 A CN 202011049718A CN 112269332 B CN112269332 B CN 112269332B
Authority
CN
China
Prior art keywords
microcontroller
circuit
switch
resistor
exclusive
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
CN202011049718.1A
Other languages
Chinese (zh)
Other versions
CN112269332A (en
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.)
Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Original Assignee
Yulong Computer Telecommunication Scientific Shenzhen 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 Yulong Computer Telecommunication Scientific Shenzhen Co Ltd filed Critical Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Priority to CN202011049718.1A priority Critical patent/CN112269332B/en
Publication of CN112269332A publication Critical patent/CN112269332A/en
Application granted granted Critical
Publication of CN112269332B publication Critical patent/CN112269332B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0428Safety, monitoring
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/24Pc safety
    • G05B2219/24024Safety, surveillance

Abstract

The embodiment of the application discloses a microcontroller system circuit, and relates to the field of circuits. When the microcontroller is halted, the microcontroller cannot output a high level on the third input/output end, so that the levels of the two input ends of the exclusive-OR gate chip are different, and the high level is input at the output end of the exclusive-OR gate chip to trigger the conduction of the switch tube, so that a low level is applied to the reset end of the microcontroller to reset the microcontroller; this application just can realize microcontroller system circuit through simple exclusive-or gate chip and switch tube, has lower hardware cost, all can use in the microcontroller system of single button, and the commonality is stronger.

Description

Microcontroller system circuit and electronic device
Technical Field
The present invention relates to the field of circuits, and in particular, to a microcontroller system circuit and an electronic device.
Background
After a crash of the Microcontroller (MCU), for example: the microcontroller executes dead loop, and in order to restore the microcontroller to normal, the microcontroller is generally reset manually or automatically, and the following 2 schemes are mainly adopted: 1. the automatic reset of the microcontroller is realized through a built-in watchdog circuit of the microcontroller or an additional watchdog circuit. 2. And a power management chip integrating a hardware reset function is additionally arranged, and the power management chip is directly reset when the microcontroller is halted, so that the microcontroller is powered up again to achieve the effect of resetting the microcontroller. The 1 st scheme is only suitable for the watchdog circuit with 100% reliability when the microcontroller crashes, and the additional watchdog circuit increases the cost. Solution 2 can significantly increase the cost of the product, and cost sensitive electronic devices are often unacceptable.
Disclosure of Invention
The embodiment of the application provides a microcontroller system circuit and electronic equipment, and can solve the problem that the hardware cost of a reset circuit in the related technology is high. The technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a microcontroller system circuit, including:
the circuit comprises a switch, an exclusive-OR gate chip, a switching tube, a microcontroller, a direct current voltage stabilizing circuit and a battery;
one end of the switch is connected with a power input end of the battery, and the other end of the switch is connected with a first input end of the exclusive-OR gate chip;
the first input end of the exclusive-OR gate chip is connected with the second input/output end of the microcontroller, the first input end of the exclusive-OR gate chip is connected with the enabling end of the direct current voltage stabilizing circuit, the second input end of the exclusive-OR gate chip is connected with the third input/output end of the microcontroller, the grounding end of the exclusive-OR gate chip is grounded, the power supply end of the exclusive-OR gate chip is connected with the power supply output end of the direct current voltage stabilizing circuit, and the output end of the exclusive-OR gate chip is connected with the control end of the switch tube;
the first switch end of the switch tube is connected with the reset end of the microcontroller, and the second switch end of the switch tube is grounded;
the first input/output end of the microcontroller is connected with the enabling end of the direct current voltage stabilizing circuit;
the power output end of the direct current voltage stabilizing circuit is connected with the power input end of the microcontroller, and the power output end of the battery is connected with the power input end of the direct current voltage stabilizing circuit.
In a second aspect, the present application provides an electronic device comprising the microcontroller system circuit of one of the above items and a circuit board on which the microcontroller system circuit is disposed.
The beneficial effects brought by the technical scheme provided by some embodiments of the application at least comprise:
the circuit for realizing the reset function comprises an exclusive-OR gate chip and a switch tube, when the microcontroller is halted, the microcontroller cannot output a high level on a third input/output end, so that the levels of two input ends of the exclusive-OR gate chip are different, the output end of the exclusive-OR gate chip inputs the high level to trigger the switch tube to be switched on, and therefore a low level is applied to the reset end of the microcontroller to reset the microcontroller; this application just can realize microcontroller system circuit through simple exclusive-or gate chip and switch tube, has lower hardware cost, all can use in the microcontroller system of single button, and the commonality is stronger.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of a microcontroller system circuit according to an embodiment of the present invention;
fig. 2 is another schematic structural diagram of a microcontroller system circuit 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 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.
Referring to fig. 1, a schematic structural diagram of a microcontroller system circuit according to an embodiment of the present invention is shown, where the microcontroller system circuit is hereinafter referred to as a reset circuit, and the reset circuit includes:
the circuit comprises a switch SW1, an exclusive-OR gate chip U2, a switch tube Q1, a microcontroller U1, a power-on reset circuit U3, a direct-current voltage stabilizing circuit LDO and a Battery. The switching transistor Q1 may be a PNP transistor, an NPN transistor, or a MOS transistor, and the embodiment is not limited. The direct current voltage stabilizing circuit LDO is used for carrying out voltage stabilization processing and voltage conversion on the output voltage of the battery and providing a stable voltage signal meeting the requirement for the microcontroller U1. The principle of the exclusive-or gate chip U2 is: if the two input levels are different, the output is high level 1; if the two inputs are at the same level, the output is at low level 0. I.e. if the two inputs are different, the xor gate outputs a high level 1. The battery Batter is a battery for providing direct-current voltage, is divided according to whether charging is available or not, and can be a rechargeable battery or a disposable battery; the battery can be a built-in battery or a detachable battery according to the replacement possibility; the battery may be a solar cell.
The connection relationship among the above-mentioned parts is: one end of the switch SW1 is connected with a power input end VBAT of the Battery Battery, and the other end of the switch SW1 is connected with a first input end of the XOR gate chip U2; a first input end 1 of the XOR gate chip U2 is connected with a second input/output end 2 of the microcontroller U1, a first input end 1 of the XOR gate chip U2 is connected with an enable end EN of the direct current voltage stabilizing circuit LDO, a second input end 2 of the XOR gate chip U2 is connected with a third input/output end 3 of the microcontroller U1, a grounding end of the XOR gate chip U2 is grounded, a power supply end of the XOR gate chip U2 is connected with a power supply output end VDD of the direct current voltage stabilizing circuit LDO, and an output end of the XOR gate chip U2 is connected with a control end of the switch tube Q1; a first switch end of the switch tube Q1 is connected with a Reset end Reset of the microcontroller U1 through a power-on Reset circuit U3, and a second switch end of the switch tube Q1 is grounded; the power supply end of the power-on reset circuit U3 is connected with the power supply output end VDD of the direct current voltage stabilizing circuit LDO, and the grounding end of the power-on reset circuit U3 is grounded; a first input/output end 1 of the microcontroller U1 is connected with an enable end EN of the direct current voltage stabilizing circuit LDO; the power output end VDD of the direct current voltage stabilizing circuit LDO is connected with the power input end of the microcontroller U1, and the power output end VBAT of the Battery Battery is connected with the power input end of the direct current voltage stabilizing circuit LDO. The negative electrode of the Battery is grounded, and each grounding end in the equivalent circuit is connected with the negative electrode of the Battery.
In a possible implementation manner, the circuit of this embodiment further includes: a first resistor and a second resistor;
one end of the switch is connected with the power output end of the battery through the first resistor, and the other end of the switch is grounded through the second resistor.
In a possible implementation manner, the circuit of this embodiment further includes: the circuit comprises a third resistor, a fourth resistor, a first capacitor and a second capacitor;
the power supply end of the exclusive-or gate chip is grounded through the first capacitor, and the second input end of the exclusive-or gate chip is grounded through the third resistor; one end of the fourth resistor is connected with the output end of the exclusive-or gate chip, the other end of the fourth resistor is connected with the control end of the switch tube, and the other end of the fourth resistor is grounded through the second capacitor.
In a possible implementation manner, the power-on reset circuit of this embodiment includes: a third capacitor and a fifth resistor;
one end of the fifth resistor is connected with the reset end of the microcontroller, and the other end of the fifth resistor is connected with the power supply output end of the direct current voltage stabilizing circuit; one end of the third capacitor is connected with the reset end of the microcontroller, and the other end of the third capacitor is grounded.
In a possible implementation manner, the switch tube includes a transistor, a base of the transistor is a control terminal of the switch tube, a collector of the transistor is a first switch terminal of the switch tube, and an emitter of the transistor is a second switch terminal of the switch tube.
In one possible embodiment, the dc voltage stabilizing circuit includes a Low-dropout regulator (LDO), which is a kind of linear dc voltage regulator and is also called a Low-dropout regulator and a Low-dropout regulator, and is used to provide a stable dc voltage power supply. Compared with a common linear direct current voltage regulator, the low dropout voltage regulator can work under the condition of smaller output and input voltage difference.
The working principle of the microcontroller system circuit of the application is as follows:
the starting process comprises the following steps: when a user presses the switch SW1, two ends of the switch SW1 are in a conducting state, the enable end EN of the direct current voltage stabilizing circuit LDO is at a high level, the power output end VDD of the direct current voltage stabilizing circuit LDO outputs direct current voltage to the microcontroller U1, meanwhile, the power-on reset circuit U3 resets the microcontroller U1, a program of the microcontroller starts to run, and after the microcontroller U17 detects the high level of the second input/output end 2, the microcontroller U1 outputs the high level through the first input/output end 1, so that the enable state of the enable end EN of the direct current voltage stabilizing circuit LDO is maintained. The microcontroller U1 outputs a high level through the third input/output terminal 3, and both the first input terminal 1 and the second input terminal 2 of the xor gate chip U2 are high levels, so that the output of the xor gate chip U2 is low level, and the switch tube Q1 is in a cut-off state. When a user releases the switch SW1, the microcontroller U1 sets the third input/output end 3 to low level when detecting low level through the second input/output end 2, and at this time, both input ends of the xor gate chip U2 input low level, so that the output end outputs low level, and the switch tube Q1 is still in a cut-off state, thereby completing a normal power-on process.
To prevent microcontroller U1 from being reset during normal operation of microcontroller U1, when the user presses switch SW1, the second input/output pin 2 of microcontroller U1 detects a high level and sets the third input/output pin to a high level; when the user releases the switch SW1, the microcontroller U1 detects a low on the second input/output pin 2 and then sets the third input/output pin to a low level. Therefore, when the switch SW1 is pressed and the switch SW1 is released, both input ends of the xor gate chip U2 are at the same high level or the low level, and the output end of the xor gate chip U2 outputs the low level all the time, so that the switch tube Q1 keeps the cut-off state, and the microcontroller U1 is not reset.
When the microcontroller U1 crashes, when the user presses the switch SW1, the microcontroller U1 cannot detect the high level on the second input/output pin 2, so the microcontroller U1 cannot set the third input/output pin 3 to be the high level, the levels of the two input ends of the xor gate chip U2 are one high and one low, the levels are different in size, so the output end outputs the high level, therefore, the switch tube Q1 is in a conducting state, the level MCU _ RST at the reset end of the microcontroller U1 is pulled low, the microcontroller U1 is successfully reset, and the microcontroller U1 is recovered to be the normal state from the crashed state.
According to the microcontroller system circuit provided by the invention, the circuit with the reset function comprises the XOR gate chip and the switch tube, when the microcontroller is halted, the microcontroller cannot output a high level on the third input/output end, so that the levels of the two input ends of the XOR gate chip are different, the high level is input at the output end of the XOR gate chip to trigger the switch tube to be conducted, and therefore, a low level is applied to the reset end of the microcontroller to reset a microcontroller device; this application just can realize microcontroller system circuit through simple exclusive-or gate chip and switch tube, has lower hardware cost, all can use in the microcontroller system of single button, and the commonality is stronger.
Referring to fig. 2, another schematic diagram of a microcontroller system circuit provided in an embodiment of the present application is shown, where the microcontroller system circuit includes: the circuit comprises a switch SW1, an exclusive-or gate chip U2, a triode Q1, a microcontroller U1, a power-on reset circuit U3, a direct current regulator LDO, a Battery, a first resistor R1, a second resistor R2, a third resistor R3, a fourth resistor R4, a first capacitor C1 and a second capacitor C2; the power-on reset circuit U3 includes a fifth resistor R5 and a third capacitor C3.
The connection relationship of each component in the microcontroller system circuit of this embodiment is:
one end of the switch SW1 is connected to the power output VBAT of the Battery through a first resistor R1, the other end of the switch SW1 is connected to the first input terminal 1 of the xor gate chip U2, and the other end of the switch SW1 is grounded through a second resistor R2. A first input end 1 of the exclusive-or gate chip U2 is connected with a second input/output end 2 of the microcontroller U1, and a first input end 1 of the exclusive-or gate chip U2 is connected with an enable end EN of the direct current regulator LDO; a second input end 2 of the exclusive-or gate chip U2 is connected with a third input/output end 3 of the microcontroller U1, and a second input end 2 of the exclusive-or gate chip U2 is grounded through a third resistor R3; a power supply end VCC of the XOR gate chip U2 is connected with a power supply output end VDD of the DC voltage regulator LDO and is grounded through a first capacitor C1, and a ground end of the XOR gate chip U2 is grounded; the output end of the exclusive-or gate chip U2 is connected with one end of a fourth resistor R4, the other end of the fourth resistor R4 is grounded through a second capacitor C2, the other end of the fourth resistor R4 is connected with the base electrode of a triode Q1, the emitter of the triode Q1 is grounded, the collector electrode of the triode Q1 is connected with the Reset end Reset of the microcontroller U1, one end of a fifth resistor R5 is connected with the power output end VDD of the direct current regulator LDO, and the other end of the fifth resistor R5 is connected with the Reset end of the microcontroller U1; one end of the third capacitor C3 is connected to the reset terminal of the microcontroller U1, and the other end is grounded.
The operation of the microcontroller system circuit of this embodiment can be described with reference to fig. 1, and is not described herein again.
The embodiment also provides an electronic device, which comprises the microcontroller system circuit and a circuit board, wherein the microcontroller system circuit is arranged on the circuit board. The electronic device may be a wearable device, for example: smart watch, smart bracelet, tracker, also can be mobile device, for example: mobile phones, tablet computers, and the like. Optionally, each device in the microcontroller system circuit is covered with a waterproof coating, so that a waterproof effect can be achieved, and the resistance device is prevented from being out of work after water enters. Optionally, each device in the microcontroller system circuit is a patch element. Optionally, the cell is a solar cell.
The above-described embodiments do not limit the scope of the present invention. Any modification, equivalent replacement, and improvement made within the spirit and principle of the above-described embodiments should be included in the protection scope of the technical solution.

Claims (10)

1. A microcontroller system circuit, comprising: the circuit comprises a switch, an exclusive-OR gate chip, a switching tube, a microcontroller, a direct current voltage stabilizing circuit, a power-on reset circuit and a battery;
one end of the switch is connected with a power input end of the battery, and the other end of the switch is connected with a first input end of the exclusive-OR gate chip;
the first input end of the exclusive-OR gate chip is connected with the second input/output end of the microcontroller, the first input end of the exclusive-OR gate chip is connected with the enabling end of the direct current voltage stabilizing circuit, the second input end of the exclusive-OR gate chip is connected with the third input/output end of the microcontroller, the grounding end of the exclusive-OR gate chip is grounded, the power supply end of the exclusive-OR gate chip is connected with the power supply output end of the direct current voltage stabilizing circuit, and the output end of the exclusive-OR gate chip is connected with the control end of the switch tube;
the first switch end of the switch tube is connected with the reset end of the microcontroller through the power-on reset circuit, the second switch end of the switch tube is grounded, the power supply end of the power-on reset circuit is connected with the power supply output end of the direct current voltage stabilizing circuit, and the ground end of the power-on reset circuit is grounded;
the first input/output end of the microcontroller is connected with the enabling end of the direct current voltage stabilizing circuit;
the power output end of the direct current voltage stabilizing circuit is connected with the power input end of the microcontroller, and the power output end of the battery is connected with the power input end of the direct current voltage stabilizing circuit.
2. The circuit of claim 1, further comprising: a first resistor and a second resistor;
one end of the switch is connected with the power output end of the battery through the first resistor, and the other end of the switch is grounded through the second resistor.
3. The circuit of claim 1, further comprising: the circuit comprises a third resistor, a fourth resistor, a first capacitor and a second capacitor;
the power supply end of the exclusive-or gate chip is grounded through the first capacitor, and the second input end of the exclusive-or gate chip is grounded through the third resistor; one end of the fourth resistor is connected with the output end of the exclusive-or gate chip, the other end of the fourth resistor is connected with the control end of the switch tube, and the other end of the fourth resistor is grounded through the second capacitor.
4. The circuit of claim 1, wherein the power-on-reset circuit: a third capacitor and a fifth resistor;
one end of the fifth resistor is connected with the reset end of the microcontroller, and the other end of the fifth resistor is connected with the power supply output end of the direct current voltage stabilizing circuit; one end of the third capacitor is connected with the reset end of the microcontroller, and the other end of the third capacitor is grounded.
5. The circuit of claim 1, wherein the switch transistor is a transistor, a base of the transistor is a control terminal of the switch transistor, a collector of the transistor is a first switch terminal of the switch transistor, and an emitter of the transistor is a second switch terminal of the switch transistor.
6. The circuit of claim 1, wherein the dc voltage regulation circuit comprises a low dropout linear regulator.
7. An electronic device comprising a circuit board and further comprising the microcontroller system circuit of any one of claims 1 through 6 disposed on the circuit board.
8. The electronic device of claim 7, wherein each component of the microcontroller system circuitry is coated with a water-resistant coating.
9. The electronic device of claim 7, wherein each device in the microcontroller system circuit is a patch element.
10. The electronic device of claim 7, wherein the battery is a solar cell.
CN202011049718.1A 2020-09-29 2020-09-29 Microcontroller system circuit and electronic device Active CN112269332B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011049718.1A CN112269332B (en) 2020-09-29 2020-09-29 Microcontroller system circuit and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011049718.1A CN112269332B (en) 2020-09-29 2020-09-29 Microcontroller system circuit and electronic device

Publications (2)

Publication Number Publication Date
CN112269332A CN112269332A (en) 2021-01-26
CN112269332B true CN112269332B (en) 2021-10-22

Family

ID=74348682

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011049718.1A Active CN112269332B (en) 2020-09-29 2020-09-29 Microcontroller system circuit and electronic device

Country Status (1)

Country Link
CN (1) CN112269332B (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5497112A (en) * 1994-07-12 1996-03-05 General Instrument Corporation Of Delaware Power-out reset system
JP4587788B2 (en) * 2004-11-24 2010-11-24 ルネサスエレクトロニクス株式会社 Logic circuit
CN101527567B (en) * 2008-03-06 2011-11-09 瑞昱半导体股份有限公司 Clock and data recovery circuit
CN101498971B (en) * 2009-03-09 2010-06-30 江苏科技大学 Remote control network physical isolation apparatus and its control method
CN204790414U (en) * 2015-06-08 2015-11-18 台衡精密测控(昆山)股份有限公司 Singlechip starting circuit
CN204992755U (en) * 2015-09-15 2016-01-20 广东恩亿梯电源有限公司 Be applied to uninterrupted power source's (UPS) static on -off control cabinet of novel dual supply

Also Published As

Publication number Publication date
CN112269332A (en) 2021-01-26

Similar Documents

Publication Publication Date Title
CN101576764B (en) CMOS data clear circuit
TWI468920B (en) Electronic device with power consumption detection function
CN102981425A (en) Startup and shutdown circuit
CN112886664A (en) Electronic device
CN106208225B (en) Charging activation circuit of rechargeable battery
CN103576816A (en) Startup and shutdown control circuit
CN112269332B (en) Microcontroller system circuit and electronic device
CN114089714A (en) Portable electronic device
CN103713912A (en) Automatic power on circuit of computer
CN210609103U (en) Reset detection circuit and electronic equipment
CN217467616U (en) Power supply control circuit and electronic device
CN203537357U (en) Simple time delay switching circuit
CN107272864B (en) Reset circuit, battery and electronic equipment
CN113054967B (en) Control circuit and method for startup and shutdown
CN111224380A (en) Power supply protection circuit, device and equipment
CN115373499B (en) Reset circuit and electronic device
CN210015422U (en) Single chip microcomputer control circuit and intelligent terminal applying same
CN215010044U (en) Current-limiting signal generating circuit and electronic equipment
CN219918395U (en) Power supply monitoring circuit, chip and electronic equipment
CN216649655U (en) Self-release control circuit and device of self-locking switch
CN213243957U (en) Reset circuit and electronic device
CN216851930U (en) Starting circuit and electronic equipment
CN217956942U (en) Low-power-consumption memory starting circuit
CN214069562U (en) Power-down protection circuit and integrated chip
CN112887438B (en) Energy controller, system image file downloading method and file downloading system

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
GR01 Patent grant
GR01 Patent grant