In the single-chip application system, the IO port of the single-chip microcomputer is often used to realize the function of self-shutdown (complete shutdown). Generally, an electronic switch of an MCU is used to control an electronic switch to realize that, because the MCU is powered off, the power is lost, so when the power is turned off, the level of the IO port that is turned off must be low. But there is a contradiction here, that is, when the electronic switch is turned off, due to the existence of the power supply filter capacitor, the voltage of the single-chip system does not immediately become 0, but slowly becomes low. When the voltage is low to a certain voltage, the single-chip microcomputer will Enter the reset state, or the program runaway state, or the indeterminate state. At this time, the IO port of the MCU control shutdown may also return to the high level, which will turn the electronic switch back on. Solution: The minimum working voltage of the general-purpose single-chip microcomputer is lower than the normal working voltage. We use this difference to design the shutdown circuit, that is, the turn-on voltage of the electronic switch must be greater than the minimum working voltage of the single-chip microcomputer, so that when the single-chip microcomputer works normally, the control voltage is higher. High, can maintain the normal conduction of the electronic switch, and when the microcontroller is in the process of power-off, the high level of the IO port due to the low voltage, because the voltage is low, is not enough to maintain the conduction of the electronic switch, thus achieving a thorough Electricity. When it is off: When S1 is pressed, Q2 is turned on. After the MCU works, the POWER output is high, and Q1 is turned on to maintain the conduction of Q2. When turned on: 1. Software shutdown: The POWER pin of the MCU outputs a low level, Q1 is turned off, Q2 is turned off, and the power is turned off. (usually used for delayed shutdown, like a digital multimeter is) 2. S1 is pressed, and the low level passes the D3 to make the input pin of the MCU ON-OFF level low. After the MCU detects it, it is shut down by software (as described in 1). D3 is used for isolation, otherwise the ON-OFF pin of the MCU is low when the power is off, and Q2 will be turned on. POWER is the output power of the single-chip microcomputer. The low level is 0, and the high level is equal to the power supply voltage of the single chip (approximate). ON-OFF is the input pin of the MCU. It is used by the MCU to detect the state of S1. If S1 is not used, the ON-OFF pin can be used. Our company specializes in the production and sales of all kinds of terminals, copper terminals, nose wire ears, cold pressed terminals, copper joints, but also according to customer requirements for customization and production, our raw materials are produced and sold by ourselves, we have their own raw materials processing plant, high purity T2 copper, quality and quantity, come to me to order it! Copper Connecting Terminals,Cable Lugs Insulated Cord End Terminals,Pvc Insulated Cord End Terminal,Cable Connector Insulated Cord End Terminal Taixing Longyi Terminals Co.,Ltd. , https://www.lycopperlugs.com