Power Saving Modes in 8051 MicroController Presented byIshan Deshpande 191060021- (Introduction and need of Power Saving Modes in 8051) Aniket Ghodake 191060030- (PCON Register) Chinmay Bhangale 191060010- (Types of Power Saving Modes, IDLE Mode) Parth Deshpande 191060022- (Power Down Mode) Kedar Daithankar 191060019- (Power Control Logic of 8051) Prathamesh Bhosale 191060011- (Differences between IDLE Mode and Power Down Mode, Comparison between AT89S51, C8051F96x series, MCS 51, and ML51 series) Introduction to Power Saving Modes in 8051: • 8051 has an inbuilt power-saving feature which is useful in embedded applications where power consumption is the main constraint. • Most embedded devices in today’s day and age are stand-alone devices powered by advanced battery technologies. These limited sources of energy put a lot of constraints on the developer as they have to find a trade-off between performance and optimum energy usage. • To handle this issue, the MCS-51 microcontroller (aka OG 8051) by Intel offered two power conserving modes: namely Idle mode and Power-Down mode. Over the years, the demand for low power microcontrollers has gone up exponentially and there are many low-power microcontrollers to choose from. • The companies that still manufacture controllers using the 8051 cores have also stepped up to take the two power saving modes of the 8051 up a notch by introducing many new features in their variants. Need for Power Saving Modes • 8051 is a combination of timers, a serial communication module, interrupts, I/O ports, and a CPU. For most applications, it is necessary to use all these resources in tandem and also manage their power demands efficiently. Thus, the power that a microcontroller needs for a certain application is irregular. • However, when some of the features of the resulting embedded systems are not in use, the systems can enter these power-saving modes offered by the microcontroller. • It is absolutely necessary for IoT devices to have power saving features. They operate in low power modes for long times and only get into an active mode when necessary. PCON Register PCON (Power Control) register is used to force the 8051 microcontrollers into powersaving mode. The power control register of 8051 contains two power-saving mode bits and one serial baud rate control bit. The PCON register in the SFR space selects the power-saving mode in 8051. It is placed at memory location 87H and it is not bit addressable. To select IDLE mode, the 0th bit in the PCON register (IDL) is set to 1, and for power-down mode, bit 1 (PD) is set to 1. If both the bits are set to 1, then power down is given precedence. Bit 7 – SMOD 1 = Baud rate is doubled in UART mode 1, 2 and 3. 0 = No effect on Baud rate. Bit 3:2 – GF1 & GF0: These are general purpose bit for user. Bit 1 – PD: Power Down 1 = Enable Power-Down mode. In this mode, the Oscillator clock turned OFF and both CPU and peripherals clock stopped. Hardware reset can cancel this mode. 0 = Disable Power-down mode. Bit 0 – IDL: Idle 1 = Enable Idle mode. CPU clock turned off whereas internal peripheral module such as a timer, serial port, interrupts works normally. Interrupt and H/W reset can cancel this mode. 0 = Disable Idle mode. Types of Power Saving Modes • There are 2 types of Power saving modes in 8051 namely: 1) Idle Mode and 2) Power Down Mode PD IDL Status 0 0 Normal Power mode 0 1 Idle mode 1 0 Power down mode 1 1 Power down mode *Whenever the processor restarts by default it is in normal mode. IDLE Mode • In the case of the idle mode, the CPU of the microcontroller which is the highest powerconsuming device, is turned off. All the other peripherals like the timer, serial communication, and interrupts keep functioning normally. Also, the statuses of the CPU, Accumulator, and the stack pointer remain as it is. ALE and PSEN’ output high signals. Due to the functioning of peripherals, the current consumption is relatively higher than Power-down mode. There is no exact figure of the current consumption as it depends on the number of peripherals working, but it is in the range of 6 to 7 milliamperes. • There are two ways to pull the 8051 microcontroller out from the idle mode. 1.If any enabled interrupt occurs during the idle mode, it resets the IDL bit of the PCON register 2.Hardware reset. • As the clock is already running in the case of the idle mode, the reset pin should be held active for two clock cycles. The reset clears the IDL bit, and the CPU resumes operation from where it left off; that is the instruction after the one that invoked the IDL mode. Power Down Mode • When it comes to saving power, the power-down mode is the more effective option. This mode stops the on-chip oscillator, which freezes the clock stopping all the functions of the microcontroller. The data in SFRs and RAM space are held as it is, and port pins output the values stored in their SFRs. ALE and PSEN’ output lows. In terms of power requirements, the power-down mode reduces the current usage to 60 microamperes and the voltage requirement to 2v. The Vcc of the 8051 should be reduced to 2v only when it is in power-down mode, and it should be shifted to 5v when it operates in normal modes. • Hardware reset is the only way to exit the Power Down Mode. This redefines the values of the SFRs but doesn’t affect the values of the on-chip RAM. The hardware reset requirement to exit the power-down mode is not the optimal method for programmers. However, there are some modern 8051 variants that allow the programmer to exit the power-down mode using interrupts too. • Hardware Reset frees the Oscillator and must be held active to allow the oscillator to stabilize (a 10-millisecond is normally good enough). Also, the Vcc should be reset to 5V before Hardware resetting. Power Control Logic of 8051 Differences Between IDLE and Power Down Mode Parameter Initialized by setting Power Down Mode PCON.1 Idle Mode PCON.0 Terminated By By Hardware Reset Only Any Enabled Interrupt or Hardware Reset Current 50uA 6.5mA Condition of SFRs after Exit Reinitialized Remain Unchanged Condition of Internal RAM Condition of Ports during Sleep On-Chip Oscillator CPU status Unchanged Unchanged Inactive Inactive Unchanged Unchanged Active Inactive Comparison between AT89S51, C8051F96x series, MCS 51, and ML51 series 8051 Microcontroller variants AT89S51 C8051F96x MCS 51 ML51 Operating Oscillator Frequency 12 MHz 24.5Mhz 12 MHz 24MHz Current required in Normal mode 25mA 4.9mA 25mA 80uA Current required in Idle mode 6.5mA 3.5mA 6.5mA 13uA Current required in Power Down mode 50uA 487uA. 50uA 1uA Thank You! References: 1) https://technobyte.org/8051-low-power-down-idle-mode-guide/ 2) https://roboticelectronics.in/power-saving-mode-in-8051/ 3) https://www.electronicwings.com/8051/8051-power-down-and-idle-mode