EasyManua.ls Logo

STC micro STC8A8K64D4 Series - Wake up MCU from Power Saving Mode Using LVD Interrupt; Power-Down Wake-Up Timer)

Default Icon
901 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
STC8A8K64D4 Series Manual
-
- 92 -
P5M1 DATA 0C9H
P5M0 DATA 0CAH
ORG 0000H
LJMP MAIN
ORG 0100H
MAIN:
MOV SP, #5FH
MOV P0M0, #00H
MOV P0M1, #00H
MOV P1M0, #00H
MOV P1M1, #00H
MOV P2M0, #00H
MOV P2M1, #00H
MOV P3M0, #00H
MOV P3M1, #00H
MOV P4M0, #00H
MOV P4M1, #00H
MOV P5M0, #00H
MOV P5M1, #00H
MOV WKTCL,#0FFH ; Set the power-down wake-up clock to be about 1 second
MOV WKTCH,#87H
LOOP:
NOP
NOP
MOV PCON,#02H ;MCU enters power-down mode
NOP
NOP
NOP
NOP
CPL P1.1
JMP LOOP
END
6.7.12 Wake up MCU from Power Saving Mode using LVD interrupt
( Recommended for use with power-down wake-up timer)
In the power saving mode when the clock is stopped, it is not recommended to start the LVD and comparator, or hardware
system will automatically start internal high precision 1.19 V reference source which has a corresponding temperature drift
and calibration circuit, and leads to about 300uA extra power consumption. After MCU enters into the clock stopped vibration
mode, the working voltage of 3.3V only takes about 0.4uA current, so it is not recommended to open the LVD and comparator
when the MCU enters the clock stop mode. If it is really needed, it is recommended to turn on the power-down wake-up timer.
The power-down wake-up timer will only increase the power consumption of about 1.4uA, which is acceptable for general
systems. The MCU is awakened every 5 seconds by the power-down wake-up timer. After wake-up LVD, comparator and
ADC can be used to detect the external battery voltage. The detection took about 1ms. Then it enters the clock
shutdown/power-saving mode. In this way, the increased average current was less than 1uA, and the overall power
consumption was about 2.8uA (0.4uA + 1.4uA +1uA).
C language code
// Operating frequency for test is 11.0592MHz
#include "reg51.h"
#include "intrins.h"
sfr RSTCFG = 0xff;
#define ENLVR 0x40 //RSTCFG.6
#define LVD2V0 0x00 //LVD@2.0V
#define LVD2V4 0x01 //LVD@2.4V

Table of Contents

Related product manuals