TWI505074B - Micro-controller reset system and reset method thereof - Google Patents
Micro-controller reset system and reset method thereof Download PDFInfo
- Publication number
- TWI505074B TWI505074B TW103129227A TW103129227A TWI505074B TW I505074 B TWI505074 B TW I505074B TW 103129227 A TW103129227 A TW 103129227A TW 103129227 A TW103129227 A TW 103129227A TW I505074 B TWI505074 B TW I505074B
- Authority
- TW
- Taiwan
- Prior art keywords
- voltage
- power supply
- transistor
- reset
- microcontroller
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims description 16
- 230000000630 rising effect Effects 0.000 claims description 5
- 230000001960 triggered effect Effects 0.000 claims description 5
- 238000006243 chemical reaction Methods 0.000 claims description 4
- 230000005611 electricity Effects 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 5
- 239000013078 crystal Substances 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Landscapes
- Electronic Switches (AREA)
Description
本發明是有關於一種重置系統,且特別是有關於一種微控制器之重置系統及其重置方法。The present invention relates to a reset system, and more particularly to a reset system for a microcontroller and a reset method thereof.
在今日的電子裝置中,為確保再次開機時,系統程序可正常執行,需要設置一個重置系統用來對電子裝置執行重置工作。舉例來說,當開始供電到一個電子裝置時,會先透過重置系統的輸出使電子裝置的微控制器維持在重置狀態一段時間,以執行重置工作。傳統上,重置系統是透過一個內置的計時器來完成這個重置工作,此計時器在此段設定的時間中會持續將微器維持在重置狀態。並再經過此段設定的時間後,讓微控制器離開重置狀態以開始操作。In today's electronic devices, in order to ensure that the system program can be executed normally when the computer is turned on again, it is necessary to set a reset system for performing resetting on the electronic device. For example, when power is supplied to an electronic device, the microcontroller of the electronic device is maintained in the reset state for a period of time by resetting the output of the system to perform a reset operation. Traditionally, the reset system does this through a built-in timer that keeps the microprocessor in reset for the time set in this section. After the time set by this paragraph, let the microcontroller leave the reset state to start the operation.
然而,傳統上的重置系統均是在開機前執行。但是有部分的微控制器,在關機前亦須執行重置程序,否則將造成再次開機後,無法正常執行系統程序。因此,對於一種可在關機前讓電子裝置的微控制器自動執行重置程序的 重置系統具有一定的需求。However, the traditional reset system is executed before booting. However, some microcontrollers must also perform a reset procedure before shutting down. Otherwise, the system program will not be executed normally after being turned on again. Therefore, for a microcontroller that allows the electronic device to automatically perform a reset procedure before shutting down There are certain requirements for resetting the system.
本發明內容之一目的是在提供一種重置系統及其方法,藉以在關機前讓電子系統的微控制器在工作的狀態下自動執行重置程序。It is an object of the present invention to provide a reset system and method thereof for automatically causing a microcontroller of an electronic system to automatically perform a reset procedure while in shutdown.
本發明內容之一技術態樣是在提供一種微控制器之重置系統。此重置系統包含一致能電路、一降壓變換器以及一重置電路。其中,致能電路電性連接一系統供電電源,當系統供電電源之電壓上升至大於一第一電壓時,致能電路輸出一上升沿陡峭的一致能訊號。降壓變換器,根據此致能訊號,將系統供電電源降壓變換以輸出一微控制器供電電源給該微控制器供電。重置電路,電性連接系統供電電源及微控制器供電電源,當系統供電電源之電壓下降至小於一第二電壓時,重置電路輸出一重置訊號重置該微控制器。其中,第一電壓小於第二電壓,當重置系統進入掉電狀態時,系統供電電源之電壓開始下降,然後微控制器供電電源之電壓開始下降,當系統供電電源之電壓下降至小於第二電壓且大於第一電壓時,重置電路輸出重置訊號且致能電路仍保持輸出致能訊號,由於致能訊號控制降壓變換器輸出該微控制器供電電源給微控制器供電,使得微控制器仍處於工作狀態,並且該微控制器接收該重置訊號進行重置,從而實現對該微控制器掉電前進行重置。One aspect of the present invention is to provide a reset system for a microcontroller. The reset system includes a uniformity circuit, a buck converter, and a reset circuit. The enabling circuit is electrically connected to a system power supply. When the voltage of the system power supply rises above a first voltage, the enabling circuit outputs a steeply consistent signal of a rising edge. The buck converter, according to the enable signal, steps down the system power supply to output a microcontroller power supply to the microcontroller. The reset circuit electrically connects the system power supply and the microcontroller power supply. When the voltage of the system power supply drops to less than a second voltage, the reset circuit outputs a reset signal to reset the microcontroller. Wherein, the first voltage is less than the second voltage, when the reset system enters the power-down state, the voltage of the system power supply begins to decrease, and then the voltage of the power supply of the microcontroller begins to decrease, when the voltage of the system power supply drops to less than the second When the voltage is greater than the first voltage, the reset circuit outputs a reset signal and the enable circuit still maintains the output enable signal, because the enable signal controls the buck converter to output the power supply of the microcontroller to power the microcontroller, so that The controller is still in operation, and the microcontroller receives the reset signal for resetting, thereby resetting the microcontroller before powering down.
在一實施例中,重置電路包含:一第一電晶體以及 一電壓比較器。第一電晶體,電性連接微控制器。電壓比較器,電性連接第一電晶體,當該系統供電電源之電壓下降至小於該第二電壓時,該電壓比較器輸出一正電壓訊號以導通該第一電晶體,當該第一電晶體導通時,該第一電晶體輸出一重置訊號以重置該微控制器。In an embodiment, the reset circuit includes: a first transistor and A voltage comparator. The first transistor is electrically connected to the microcontroller. a voltage comparator electrically connected to the first transistor. When the voltage of the power supply of the system drops to be lower than the second voltage, the voltage comparator outputs a positive voltage signal to turn on the first transistor, when the first transistor When the crystal is turned on, the first transistor outputs a reset signal to reset the microcontroller.
在一實施例中,電壓比較器之一正向輸入端電性連接該微控制器供電電源之分壓,而該電壓比較器之一反向輸入端電性連接該系統供電電源之分壓,當該正向輸入端接收的電壓小於該反向輸入端接收的電壓時,該電壓比較器輸出一負電壓訊號以截止該第一電晶體。In one embodiment, one of the voltage comparators is electrically connected to the voltage division of the microcontroller power supply, and one of the voltage comparators is electrically connected to the system power supply. When the voltage received by the forward input terminal is less than the voltage received by the reverse input terminal, the voltage comparator outputs a negative voltage signal to turn off the first transistor.
在一實施例中,重置電路更包含一電阻,該電阻一端電性連接該電壓比較器的該正向輸入端,該電路的另一端電性連接該電壓比較器的一輸出端,該電阻加快該電壓比較器的正反饋的速度。In one embodiment, the reset circuit further includes a resistor electrically connected to the forward input end of the voltage comparator, and the other end of the circuit is electrically connected to an output end of the voltage comparator. Speed up the positive feedback of the voltage comparator.
在一實施例中,致能電路包含一第二電晶體以及一第三電晶體。第二電晶體,電性連接該系統供電電源。第三電晶體,電性連接該第二電晶體、該系統供電電源及該降壓變換器。其中當該系統供電電源之電壓上升至大於該第一電壓時,該第二電晶體導通並且該第三電晶體截止,該致能電路輸出該致能訊號。In an embodiment, the enabling circuit includes a second transistor and a third transistor. The second transistor is electrically connected to the system power supply. The third transistor is electrically connected to the second transistor, the system power supply, and the buck converter. When the voltage of the system power supply rises to be greater than the first voltage, the second transistor is turned on and the third transistor is turned off, and the enabling circuit outputs the enable signal.
在一實施例中,當該系統供電電源小於一第三電壓時,該第二電晶體和該第三電晶體截止,由該系統供電電源分壓得到該致能訊號;當該系統供電電源上升到大於該第三電壓但小於該第一電壓時,該第三電晶體導通,該致能訊 號為0伏特;以及當該系統供電電源上升到大於該第一電壓時,該第二電晶體導通,該第三電晶體截止,輸出有效的該致能訊號。In an embodiment, when the system power supply is less than a third voltage, the second transistor and the third transistor are turned off, and the power supply voltage is divided by the system to obtain the enable signal; when the system power supply rises When the voltage is greater than the third voltage but less than the first voltage, the third transistor is turned on, and the enabling signal is The number is 0 volts; and when the system power supply rises above the first voltage, the second transistor is turned on, and the third transistor is turned off, and the effective enable signal is output.
在一實施例中,致能電路更包含一延時電路,電性連接該第二電晶體及該系統供電電源,用以延時導通該第二電晶體。In an embodiment, the enabling circuit further includes a delay circuit electrically connected to the second transistor and the system power supply for delaying conduction of the second transistor.
本發明內容之另一技術態樣是在提供一種微控制器之重置方法。首先,當一系統供電電源之電壓上升至大於一第一電壓時,觸發一致能電路以輸出一上升沿陡峭的一致能訊號。其此,根據接收的該致能訊號,觸發一降壓變換電路將該系統供電電源降壓變換以輸出一微控制器供電電源給一微控制器供電。最後,當該系統供電電源之電壓下降至小於一第二電壓但大於該第一電壓時,觸發一重置電路輸出一重置訊號給該微控制器進行重置且該致能電路保持輸出該致能訊號以控制該降壓變換器輸出該微控制器供電電源給該微控制器供電,使得該微控制器仍處於工作狀態。Another aspect of the present invention is to provide a reset method for a microcontroller. First, when the voltage of a system power supply rises above a first voltage, the coincidence circuit is triggered to output a consistent energy signal with a rising edge. Therefore, according to the received enable signal, a buck conversion circuit is triggered to step down the system power supply to output a microcontroller power supply to supply power to a microcontroller. Finally, when the voltage of the system power supply drops to less than a second voltage but greater than the first voltage, triggering a reset circuit to output a reset signal to the microcontroller for resetting and the enabling circuit keeps outputting the The enable signal is controlled to control the buck converter to output the microcontroller power supply to the microcontroller, so that the microcontroller is still in operation.
在一實施例中,重置電路包含:一第一電晶體以及一電壓比較器。第一電晶體,電性連接微控制器。電壓比較器,電性連接第一電晶體,當該系統供電電源之電壓下降至小於該第二電壓時,該電壓比較器輸出一正電壓訊號以導通該第一電晶體,當該第一電晶體導通時,該第一電晶體輸出一重置訊號以重置該微控制器。In an embodiment, the reset circuit includes: a first transistor and a voltage comparator. The first transistor is electrically connected to the microcontroller. a voltage comparator electrically connected to the first transistor. When the voltage of the power supply of the system drops to be lower than the second voltage, the voltage comparator outputs a positive voltage signal to turn on the first transistor, when the first transistor When the crystal is turned on, the first transistor outputs a reset signal to reset the microcontroller.
在一實施例中,致能電路包含一第二電晶體以及一 第三電晶體。第二電晶體,電性連接該系統供電電源。第三電晶體,電性連接該第二電晶體、該系統供電電源及該降壓變換器。其中當該系統供電電源之電壓上升至大於該第一電壓時,該第二電晶體導通並且該第三電晶體截止,該致能電路輸出該致能訊號。In an embodiment, the enabling circuit includes a second transistor and a The third transistor. The second transistor is electrically connected to the system power supply. The third transistor is electrically connected to the second transistor, the system power supply, and the buck converter. When the voltage of the system power supply rises to be greater than the first voltage, the second transistor is turned on and the third transistor is turned off, and the enabling circuit outputs the enable signal.
綜上所述,本發明之技術方案與現有技術相比具有明顯的優點和有益效果。藉由上述技術方案,可在系統關機,系統供電電源之電壓開始下降至小於一特定電壓時,依重置電路輸出一重置訊號讓微控制器開始進行重置程序,同時致能電路仍保持輸出致能訊號,讓微控制器仍處於工作狀態。讓微控制器在處於工作狀態下,進行重置。In summary, the technical solution of the present invention has obvious advantages and beneficial effects compared with the prior art. With the above technical solution, when the system is powered off and the voltage of the system power supply starts to drop to less than a specific voltage, the reset circuit outputs a reset signal to cause the microcontroller to start the reset process, and the enabling circuit remains. The enable signal is output, so that the microcontroller is still working. Let the microcontroller reset while it is working.
以下將以實施方式對上述之說明作詳細的描述,並對本發明之技術方案提供更進一步的解釋。The above description will be described in detail in the following embodiments, and further explanation of the technical solutions of the present invention will be provided.
100‧‧‧重置系統100‧‧‧Reset system
110‧‧‧系統供電電源110‧‧‧System power supply
120‧‧‧致能電路120‧‧‧Enable circuit
121‧‧‧第二電晶體121‧‧‧Second transistor
122‧‧‧第三電晶體122‧‧‧ Third transistor
123‧‧‧延時電路123‧‧‧Time delay circuit
130‧‧‧降壓變換器130‧‧‧ Buck converter
140‧‧‧重置電路140‧‧‧Reset circuit
141‧‧‧第一電晶體141‧‧‧First transistor
142‧‧‧電壓比較器142‧‧‧Voltage comparator
143‧‧‧電阻143‧‧‧resistance
150‧‧‧微控制器供電電源150‧‧‧Microcontroller power supply
160‧‧‧微控制器160‧‧‧Microcontroller
401,402,403‧‧‧步驟401, 402, 403‧ ‧ steps
R1、R2、R3、R4、R5和R6‧‧‧電阻R1, R2, R3, R4, R5 and R6‧‧‧ resistors
為讓本發明之上述和其他目的、特徵、優點與實施例能更明顯易懂,所附圖式之說明如下:第1圖所示是依照本發明一較佳實施例之一種微控制器的重置系統示意圖;第2圖所示是依照本發明一較佳實施例之一種重置電路的示意圖;第3圖所示是依照本發明一較佳實施例之一種致能電路的示意圖;以及第4圖所示是依照本發明一實施例之一種重置方法的 流程圖。The above and other objects, features, advantages and embodiments of the present invention will become more apparent and understood. FIG. 2 is a schematic diagram of a reset circuit in accordance with a preferred embodiment of the present invention; and FIG. 3 is a schematic diagram of an enable circuit in accordance with a preferred embodiment of the present invention; Figure 4 is a diagram showing a reset method in accordance with an embodiment of the present invention. flow chart.
為了使本發明內容之敘述更加詳盡與完備,可參照所附之圖式及以下所述各種實施例,圖式中相同之號碼代表相同或相似之元件。但所提供之實施例並非用以限制本發明所涵蓋的範圍,而結構運作之描述非用以限制其執行之順序,任何由元件重新組合之結構,所產生具有均等功效的裝置,皆為本發明所涵蓋的範圍。In order to make the description of the present invention more complete and complete, reference is made to the accompanying drawings and the accompanying drawings. However, the embodiments provided are not intended to limit the scope of the invention, and the description of the operation of the structure is not intended to limit the order of its execution, and any device that is recombined by the components produces equal devices. The scope covered by the invention.
其中圖式僅以說明為目的,並未依照原尺寸作圖。另一方面,眾所週知的元件與步驟並未描述於實施例中,以避免對本發明造成不必要的限制。The drawings are for illustrative purposes only and are not drawn to the original dimensions. On the other hand, well-known elements and steps are not described in the embodiments to avoid unnecessarily limiting the invention.
第1圖所示是依照本發明一較佳實施例之一種微控制器的重置系統示意圖。本發明微控制器的重置系統100包括一致能電路120、一降壓變換器(buck converter)130以及一重置電路140。其中,致能電路120是和一系統供電電源110電性連接,並在系統供電電源110之電壓上升至大於一第一電壓時,此致能電路120會輸出一陡峭的致能訊號(En)。降壓變換器130,亦是和此系統供電電源110電性連接,此降壓變換器130可接收致能電路120輸出的致能訊號(En),以將系統供電電源110輸出的電壓(V1)進行降壓變換,來輸出一電壓(V2)給微控制器供電電源150對一微控制器160進行供電。重置電路140,電性連接系統供電電源110和微控制器供電電源150,當系統供電電源110之電 壓下降至小於一第二電壓時,重置電路140會輸出一重置訊號(Reset),以重置微控制器160。其中,第一電壓小於第二電壓。1 is a schematic diagram of a reset system of a microcontroller in accordance with a preferred embodiment of the present invention. The reset system 100 of the microcontroller of the present invention includes a coincidence circuit 120, a buck converter 130, and a reset circuit 140. The enabling circuit 120 is electrically connected to a system power supply 110, and when the voltage of the system power supply 110 rises to be greater than a first voltage, the enabling circuit 120 outputs a steep enable signal (En). The buck converter 130 is also electrically connected to the system power supply 110. The buck converter 130 can receive the enable signal (En) output from the enable circuit 120 to output the voltage of the system power supply 110 (V1). A buck conversion is performed to output a voltage (V2) to the microcontroller power supply 150 to power a microcontroller 160. The reset circuit 140 electrically connects the system power supply 110 and the microcontroller power supply 150, and when the system power supply 110 is powered When the voltage drops below a second voltage, the reset circuit 140 outputs a reset signal (Reset) to reset the microcontroller 160. Wherein the first voltage is less than the second voltage.
換言之,根據本發明上述之重置系統100,當重置系統100進入掉電狀態時,系統供電電源110之輸出電壓(V1)會開始下降。因此透過降壓變換器130進行降壓變換提供給微控制器供電電源150的輸出電壓(V2)亦開始下降。當系統供電電源110之輸出電壓(V1)下降至小於第二電壓但大於第一電壓時,重置電路140輸出重置訊號(Reset),且因為此時系統供電電源110之輸出電壓(V1)仍是大於第一電壓,因此致能電路120仍會保持輸出此致能訊號(En)。由於降壓變換器130會受此致能訊號(En)控制,因此降壓變換器130仍會持續運作,來將系統供電電源110之輸出電壓(V1)進行降壓變換以提供輸出電壓(V2)給微控制器供電電源150,使得該微控制器160仍處於工作狀態,並接收重置電路140輸出的重置訊號(Reset)而進行重置,從而實現在微控制器斷電前執行一重置程序的目標。In other words, according to the above-described reset system 100 of the present invention, when the reset system 100 enters the power-down state, the output voltage (V1) of the system power supply 110 begins to drop. Therefore, the output voltage (V2) supplied to the microcontroller power supply 150 by the buck converter 130 is also reduced. When the output voltage (V1) of the system power supply 110 drops below the second voltage but greater than the first voltage, the reset circuit 140 outputs a reset signal (Reset), and because the output voltage (V1) of the system power supply 110 at this time Still greater than the first voltage, the enable circuit 120 will still maintain the enable signal (En). Since the buck converter 130 is controlled by the enable signal (En), the buck converter 130 will continue to operate to step down the output voltage (V1) of the system power supply 110 to provide an output voltage (V2). Powering the power supply 150 to the microcontroller, so that the microcontroller 160 is still in operation, and receiving a reset signal (Reset) output by the reset circuit 140 to perform resetting, thereby implementing a weight before the microcontroller is powered off. Set the target of the program.
第2圖所示是依照本發明一較佳實施例之一種重置電路的示意圖。重置電路140更包含一第一電晶體141以及一電壓比較器142。其中第一電晶體141為一包括一控制端的三端元件,其中之一端電性連接微控制器160,另一端接地,控制端則電性連接電壓比較器142的輸出端。電壓比較器142包括一正向輸入端(+)、一反向輸入端(-)以及一輸出端。其中,正向輸入端(+)電性連接微控制器供電電 源150之分壓,反向輸入端(-)電性連接系統供電電源110之分壓,輸出端則電性連接第一電晶體141的控制端。當正向輸入端(+)接收的微控制器供電電源150透過電阻R1和R2形成之分壓電壓小於反向輸入端(-)接收的系統供電電源110透過電阻R3和R4形成之分壓電壓時,電壓比較器142輸出一負電壓訊號給第一電晶體141的控制端以截止第一電晶體141。反之,當正向輸入端(+)接收的微控制器供電電源150透過電阻R1和R2形成之分壓電壓大於反向輸入端(-)接收的系統供電電源110透過電阻R3和R4形成之分壓電壓時,電壓比較器142輸出一正電壓訊號給第一電晶體141的控制端以導通第一電晶體141。在一實施例中,當系統供電電源110之電壓下降至小於第二電壓時,藉由對電阻R1、R2、R3和R4適當設計,使得正向輸入端(+)接收的微控制器供電電源150之分壓電壓大於反向輸入端(-)接收的系統供電電源110之分壓電壓時,電壓比較器142輸出一正電壓訊號給第一電晶體141的控制端以導通第一電晶體141。當第一電晶體141導通時,第一電晶體141輸出重置訊號(Reset)給微控制器160以進行重置程序。此外,重置電路140更包含一電阻143,其中此電阻143一端電性連接電壓比較器142的正向輸入端(+),電阻143的另一端電性連接電壓比較器142的輸出端,電阻143主要用以加快電壓比較器142的正回饋速度。2 is a schematic diagram of a reset circuit in accordance with a preferred embodiment of the present invention. The reset circuit 140 further includes a first transistor 141 and a voltage comparator 142. The first transistor 141 is a three-terminal component including a control terminal. One end is electrically connected to the microcontroller 160, and the other end is grounded. The control terminal is electrically connected to the output of the voltage comparator 142. The voltage comparator 142 includes a forward input (+), an inverted input (-), and an output. Wherein, the positive input terminal (+) is electrically connected to the microcontroller for supplying power The voltage is divided by the source 150, the reverse input terminal (-) is electrically connected to the system power supply 110, and the output terminal is electrically connected to the control terminal of the first transistor 141. The voltage divider voltage formed by the microcontroller power supply 150 received through the resistors R1 and R2 when the forward input terminal (+) is received is smaller than the voltage divider voltage formed by the system power supply 110 received by the reverse input terminal (-) through the resistors R3 and R4. The voltage comparator 142 outputs a negative voltage signal to the control terminal of the first transistor 141 to turn off the first transistor 141. Conversely, when the microcontroller input power supply 150 received by the forward input terminal (+) forms a divided voltage formed by the resistors R1 and R2, the system power supply 110 received by the reverse input terminal (-) is formed by the resistors R3 and R4. When the voltage is applied, the voltage comparator 142 outputs a positive voltage signal to the control terminal of the first transistor 141 to turn on the first transistor 141. In an embodiment, when the voltage of the system power supply 110 drops to less than the second voltage, the power supply of the microcontroller received by the forward input terminal (+) is appropriately designed by the resistors R1, R2, R3, and R4. When the divided voltage of 150 is greater than the divided voltage of the system power supply 110 received by the inverting input terminal (-), the voltage comparator 142 outputs a positive voltage signal to the control terminal of the first transistor 141 to turn on the first transistor 141. . When the first transistor 141 is turned on, the first transistor 141 outputs a reset signal (Reset) to the microcontroller 160 for a reset procedure. In addition, the reset circuit 140 further includes a resistor 143, wherein one end of the resistor 143 is electrically connected to the positive input terminal (+) of the voltage comparator 142, and the other end of the resistor 143 is electrically connected to the output terminal of the voltage comparator 142. The 143 is mainly used to speed up the positive feedback speed of the voltage comparator 142.
第3圖所示是依照本發明一較佳實施例之一種致能電路的示意圖。此致能電路120更包含一第二電晶體121 以及一第三電晶體122。其中第二電晶體121為一包括一控制端的三端元件,其中之一端電性連接第三電晶體122的控制端,另一端接地,控制端則電性連接系統供電電源110。第三電晶體122亦為一包括一控制端的三端元件,其中之一端電性連接系統供電電源110及降壓變換器130,另一端接地,控制端則電性連接第二電晶體121。Figure 3 is a schematic illustration of an enabling circuit in accordance with a preferred embodiment of the present invention. The enabling circuit 120 further includes a second transistor 121 And a third transistor 122. The second transistor 121 is a three-terminal component including a control terminal. One end is electrically connected to the control end of the third transistor 122, and the other end is grounded. The control terminal is electrically connected to the system power supply 110. The third transistor 122 is also a three-terminal component including a control terminal. One end is electrically connected to the system power supply 110 and the buck converter 130, and the other end is grounded, and the control terminal is electrically connected to the second transistor 121.
在一實施例中,致能訊號En的電壓為2伏特左右時,才能讓降壓變換器130完全致能。而致能訊號En是透過第三電晶體122的輸出和分壓電阻R5和R6根據系統供電電源110輸出的電壓而獲得。在此實施例中,電阻R5的電阻值為11K,電阻R6的電阻值為2K。依此,當系統供電電源110輸出之電壓(V1)小於一第三電壓,例如2伏特時,第二電晶體121和第三電晶體122均處於截止狀態,此時系統供電電源110透過電阻R5和R6分壓提供給降壓變換器130的電壓一定小於2伏特,在本實施例中,為0~0.36伏特,因此無法使降壓變換器130致能。而當該系統供電電源110上升到大於第三電壓但小於第一電壓,在本實施例中為大於2伏特而小於9.83伏特時,此時第三電晶體122導通,但第二電晶體121不導通,此時降壓變換器130的致能訊號En經由導通的第三電晶體122接地,因此為0伏特,此時致能訊號En處於無效狀態,因此降壓變換器130不能被致能。當系統供電電源110之電壓上升至大於第一電壓,9.83伏特時,系統供電電源110形成之分壓電壓使得第二電晶體121導通,同時透過第二電晶體121 將第三電晶體122控制端拉至接地電壓致使第三電晶體122截止,此時系統供電電源110透過電阻R5和R6分壓提供致能訊號En,在本實施例中,分壓得到的電壓為1.8~2伏特(由於電阻本身的阻值精度的特性,此處實際獲取的電壓值為接近2伏特)。依此,致能訊號En從0到2伏特,而形成一上升沿陡峭的致能訊號,能夠導致降壓變換器130的迅速啟動。在另一實施例中,致能電路120更包含一延時電路123,電性連接第二電晶體121及系統供電電源110,用以延時導通第二電晶體121,讓第三電晶體122延時截止,從而能夠得到由電阻R5和R6分壓提供所得到的致能訊號En。In one embodiment, the buck converter 130 is fully enabled when the voltage of the enable signal En is about 2 volts. The enable signal En is obtained by the output of the third transistor 122 and the voltage dividing resistors R5 and R6 according to the voltage output from the system power supply 110. In this embodiment, the resistance of the resistor R5 is 11K, and the resistance of the resistor R6 is 2K. Accordingly, when the voltage (V1) output by the system power supply 110 is less than a third voltage, for example, 2 volts, the second transistor 121 and the third transistor 122 are both in an off state, at which time the system power supply 110 transmits through the resistor R5. The voltage supplied to the buck converter 130 by the divided voltage of R6 must be less than 2 volts, and in this embodiment, 0 to 0.36 volts, so that the buck converter 130 cannot be enabled. When the system power supply 110 rises to be greater than the third voltage but less than the first voltage, in this embodiment, it is greater than 2 volts and less than 9.83 volts, at which time the third transistor 122 is turned on, but the second transistor 121 is not. When the enable signal En of the buck converter 130 is grounded via the turned-on third transistor 122, it is 0 volts, and the enable signal En is in an inactive state, so the buck converter 130 cannot be enabled. When the voltage of the system power supply 110 rises to be greater than the first voltage, 9.83 volts, the divided voltage formed by the system power supply 110 causes the second transistor 121 to be turned on while passing through the second transistor 121. Pulling the control terminal of the third transistor 122 to the ground voltage causes the third transistor 122 to be turned off. At this time, the system power supply 110 supplies the enable signal En through the voltage dividers R5 and R6. In this embodiment, the voltage obtained by the voltage division is obtained. It is 1.8~2 volts (the actual voltage value obtained here is close to 2 volts due to the resistance accuracy of the resistor itself). Accordingly, the enable signal En is from 0 to 2 volts, and a steep enable signal is formed on the rising edge, which can cause the buck converter 130 to start up quickly. In another embodiment, the enabling circuit 120 further includes a delay circuit 123 electrically connected to the second transistor 121 and the system power supply 110 for delaying the conduction of the second transistor 121 to delay the third transistor 122. Thus, the enable signal En obtained by dividing the voltages of the resistors R5 and R6 can be obtained.
第4圖所示是依照本發明一實施例之一種重置方法的流程圖。本發明的微控制器之重置方法。首先於步驟401,當一系統供電電源之電壓上升至大於一第一電壓時,觸發一致能電路以輸出一上升沿陡峭的一致能訊號。接著,於步驟402,根據接收的該致能訊號,觸發一降壓變換電路。在一實施例中,此降壓變換電路會將該系統供電電源降壓變換以輸出一微控制器供電電源給一微控制器供電。其後於步驟403,當該系統供電電源之電壓下降至小於一第二電壓但大於該第一電壓時,觸發一重置電路輸出一重置訊號給該微控制器進行重置,同時該致能電路保持輸出該致能訊號以控制該降壓變換器輸出該微控制器供電電源給該微控制器供電。依此,可讓微控制器在處於工作狀態下,進行重置。Figure 4 is a flow chart showing a reset method in accordance with an embodiment of the present invention. The reset method of the microcontroller of the present invention. First, in step 401, when the voltage of a system power supply rises above a first voltage, the coincidence circuit is triggered to output a stable energy signal with a rising edge. Next, in step 402, a buck conversion circuit is triggered according to the received enable signal. In one embodiment, the buck converter circuit bucks the system power supply to output a microcontroller power supply to power a microcontroller. Then, in step 403, when the voltage of the system power supply drops to less than a second voltage but greater than the first voltage, triggering a reset circuit to output a reset signal to the microcontroller to reset, and at the same time The enable circuit keeps outputting the enable signal to control the buck converter to output the microcontroller power supply to the microcontroller. In this way, the microcontroller can be reset while it is in operation.
綜上所述,本發明在系統關機,系統供電電源之電壓開始下降至小於一特定電壓時,依重置電路輸出一重置訊號讓微控制器開始進行重置程序,同時致能電路仍保持輸出致能訊號,讓微控制器仍處於工作狀態。讓微控制器在處於工作狀態下,進行重置。In summary, when the system is powered off and the voltage of the system power supply starts to drop to less than a specific voltage, the reset circuit outputs a reset signal to cause the microcontroller to start the reset process, and the enabling circuit remains. The enable signal is output, so that the microcontroller is still working. Let the microcontroller reset while it is working.
雖然本發明已以實施方式揭露如上,然其並非用以限定本發明,任何所屬領域中具有通常知識者,在不脫離本發明之精神和範圍內,當可作各種之更動與潤飾,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。The present invention has been disclosed in the above embodiments, and is not intended to limit the invention, and it is intended that various modifications and changes may be made without departing from the spirit and scope of the invention. The scope of the invention is defined by the scope of the appended claims.
100‧‧‧重置系統100‧‧‧Reset system
110‧‧‧系統供電電源110‧‧‧System power supply
120‧‧‧致能電路120‧‧‧Enable circuit
130‧‧‧降壓變換器130‧‧‧ Buck converter
140‧‧‧重置電路140‧‧‧Reset circuit
150‧‧‧微控制器供電電源150‧‧‧Microcontroller power supply
160‧‧‧微控制器160‧‧‧Microcontroller
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW103129227A TWI505074B (en) | 2014-08-25 | 2014-08-25 | Micro-controller reset system and reset method thereof |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW103129227A TWI505074B (en) | 2014-08-25 | 2014-08-25 | Micro-controller reset system and reset method thereof |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| TWI505074B true TWI505074B (en) | 2015-10-21 |
| TW201608365A TW201608365A (en) | 2016-03-01 |
Family
ID=54851805
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| TW103129227A TWI505074B (en) | 2014-08-25 | 2014-08-25 | Micro-controller reset system and reset method thereof |
Country Status (1)
| Country | Link |
|---|---|
| TW (1) | TWI505074B (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TWI591538B (en) | 2017-01-18 | 2017-07-11 | 新唐科技股份有限公司 | Microcontrollers |
| TWI806786B (en) * | 2022-10-07 | 2023-06-21 | 瑞昱半導體股份有限公司 | Integrated circuit |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TWI317571B (en) * | 2005-03-17 | 2009-11-21 | Creative Tech Ltd | Power supply, method for supplying power and electrical device using the same |
| TWI369048B (en) * | 2008-10-24 | 2012-07-21 | Advanced Analog Technology Inc | Floating protection circuit and photo-flash capacitor charger thereof |
-
2014
- 2014-08-25 TW TW103129227A patent/TWI505074B/en not_active IP Right Cessation
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TWI317571B (en) * | 2005-03-17 | 2009-11-21 | Creative Tech Ltd | Power supply, method for supplying power and electrical device using the same |
| TWI369048B (en) * | 2008-10-24 | 2012-07-21 | Advanced Analog Technology Inc | Floating protection circuit and photo-flash capacitor charger thereof |
Also Published As
| Publication number | Publication date |
|---|---|
| TW201608365A (en) | 2016-03-01 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2017202304A1 (en) | Start-up and shut-down circuit | |
| CN103699026A (en) | Control device and method for realizing multi-source power-on timing sequence and power-down timing sequence | |
| CN111601422B (en) | Starting circuit and electronic equipment | |
| TWI391808B (en) | Overclocking module and computer system and method thereof | |
| CN105446446B (en) | A kind of hardware watchdog power control and method | |
| US8729936B2 (en) | Power switch module, voltage generating circuit and power control method for electronic device | |
| US9372517B2 (en) | Micro-controller reset system and reset method thereof | |
| WO2015058410A1 (en) | Adjustment method and boot method for power-off threshold voltage and electronic device thereof | |
| TW201312314A (en) | Computer device and frequency adjusting method for central processing unit | |
| TW201339772A (en) | Electronic device and its power control circuit | |
| CN104238627A (en) | Method for realizing server power-on/off sequential control by using hardware circuit | |
| CN201976079U (en) | Resetting circuit and television comprising same | |
| TWI505074B (en) | Micro-controller reset system and reset method thereof | |
| CN105006961A (en) | Power on sequence control circuit on multi-channel power supply and method | |
| TW201405300A (en) | Circuit for controlling computers | |
| KR102185108B1 (en) | Electronic apparatus and power supply circuit thereof | |
| CN207106201U (en) | A power supply system for electric vehicles | |
| CN105204601A (en) | System automatic power-on circuit and method | |
| CN111301313A (en) | A protection device and on-vehicle electronic equipment for on-vehicle electronic equipment | |
| CN107703810B (en) | Self-locking electronic switch | |
| CN102915259A (en) | Hardware watchdog circuit of car electronic circuit | |
| TWI482090B (en) | System capable of booting through a universal serial bus device and method thereof | |
| CN108944736B (en) | Automobile, automobile electronic equipment and starting control circuit thereof | |
| CN111596753A (en) | Power consumption control method and device, electronic equipment and computer readable storage medium | |
| CN207301968U (en) | A kind of single-button switching on and shutting down charging control circuit |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| MM4A | Annulment or lapse of patent due to non-payment of fees |