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.
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
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- [D-Gesture Recognition Device] Design Report Sharing of Topic D
- About FlexRay Communication Test
- Thank yourself
- Please advise on the design of a circulating water lamp
- Learn about the key features and benefits of the TPS62840
- Op amp differential attenuation circuit problem
- Dismantling and Renovation of Old LED Bulbs
- Emitter follower principle and typical circuit
- STM32 A certain function is put into RAM and runs without any phenomenon
- I searched Baidu for half an hour but couldn't find the answer. I used a search engine to find the answer in seconds.