PIC series microcontroller low power mode (SLEEP)

Publisher:李国永Latest update time:2016-10-19 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
1. Enter SLEEP

    Execute a "SLEEP" instruction to enter low power mode. When entering SLEEP, WDT is cleared and then restarts counting. The PD bit in the status register F3K is set to "0", the TO bit is set to "1", and the oscillation stops (referring to the oscillation circuit at the OSC1 end). All I/O ports remain in their original state. This working mode has the lowest power consumption.

    To minimize current consumption, before entering SLEEP, all I/O ports should be at high level VDD or low level VSS, and should not be in high impedance state to avoid switching current loss. You can add pull-up or pull-down resistors to the I/O ports, or set all I/O ports to output state to avoid high impedance state (floating state).

    The RTCC terminal should also be set to VDD or VSS (by pull-up or pull-down).
    MCLR must be in high level state.

 

2. Wake up from sleep

 

    SLEEP can be awakened by WDT overflow; or by adding a low level at the MCLR terminal to wake up SLEEP. The latter wake-up method is often used in the following applications: After the system's main power is off and powered by the backup power supply (battery), execute the "SLEEP" instruction to enter low-power mode, so that the battery can maintain system data for a long time. When the main power is restored, let it generate a low level at MCLR to wake up SLEEP and reset it again. In this way, an external reset circuit needs to be added to the MCLR terminal, please refer to §1.10.5.

    When the system is powered on, the PD bit of F3 is set to "1", and after executing the "SLEEP" instruction, the PD bit is set to "0". Therefore, the PD bit can be used to determine whether the system is reset by waking up from SLEEP mode or reset after power-on. The TO bit in F3 can determine whether the system in SLEEP state is awakened by WDT overflow or by a low level at the MCLR terminal given by the outside world. These distinctions are sometimes very important, especially for some system initialization.

Reference address:PIC series microcontroller low power mode (SLEEP)

Previous article:PIC microcontroller example seven: SED1565 LCD serial driver
Next article:PIC12F629 microcontroller T1 timer program

Recommended ReadingLatest update time:2024-11-16 15:02

PIC16F877A sleep mode
Power down mode is also sleep mode, and the status bit PD is cleared; adding sleep() to the program can make the IC enter sleep mode. In sleep mode, if watchdog is enabled, it will continue to work after watchdog is cleared; oscillator stops working; IO port keeps the state when entering sleep mode; MCLR must be set t
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号