There are several low power consumption methods for 89C51 microcontroller

Publisher:lxy64420245Latest update time:2023-01-05 Source: zhihuKeywords:89C51 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

  There is a power management register PCON inside the microcontroller. The lowest two bits of this register, IDL and PD, are used to set whether to enter the idle mode and power-down mode of the microcontroller respectively.


  1. Idle mode

  When the microcontroller enters idle mode, except for the CPU which is in sleep mode, all other hardware is active. The data in the data memory and special function registers not involved in the program in the chip will maintain their original values ​​during idle mode. But if the timer is running, the value in the counter register will also increase. The microcontroller can be woken up by any interrupt or hardware reset in idle mode. It should be noted that when an interrupt is used to wake up the microcontroller, the program continues to run from where it originally stopped. When a hardware reset is used to wake up the microcontroller, the program will start execution from the beginning.


  The purpose of letting the microcontroller enter idle mode is usually to reduce the power consumption of the system. To give a very simple example, everyone has used a digital multimeter. During normal use, the microcontroller inside the meter is in normal working mode. When not in use, it forgets In order to turn off the power of the multimeter, most meters will automatically turn off the LCD display after waiting for a few minutes if there is no human operation to reduce system power consumption. Usually, this function is implemented by using the idle mode of the microcontroller. Or power down mode. Taking the STC89 series of microcontrollers as an example, the power consumption of the microcontroller is usually 4mA to 7mA when it is working normally. When it enters idle mode, its power consumption drops to 2mA. When it enters power-down mode, its power consumption can be reduced to less than 0.1μA.


  2. Sleep mode

  When the microcontroller enters power-down mode, the external crystal oscillator stops, the CPU, timer, and serial port all stop working, and only the external interrupt continues to work. The instruction that causes the microcontroller to enter sleep mode will be the last instruction executed by the microcontroller before sleeping. After entering sleep mode, the data in the data memory and special function registers not involved in the program in the chip will retain their original values. The microcontroller can be woken up by an external interrupt low level trigger or by a falling edge trigger interrupt or a hardware reset mode. It should be noted that when an interrupt is used to wake up the microcontroller, the program continues to run from where it originally stopped. When a hardware reset is used to wake up the microcontroller, the program will Execute from scratch.


  You can adjust the digital multimeter to the current range and then connect it in series to the circuit to observe the changes in the total current flowing through the system in the normal operating mode, sleep mode, and idle mode of the microcontroller. After testing, the results can be found as follows: Normal operating current > idle mode Current > Sleep mode current.


Keywords:89C51 Reference address:There are several low power consumption methods for 89C51 microcontroller

Previous article:The first step of microcontroller - 51 microcontroller
Next article:Quick introduction to 8051 microcontroller - my first lamp

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号