STC8A8K64D4 Series Manual
P5M1
DATA
P5M0
DATA
ORG
0000H
LJMP
ORG
MAIN:
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
LOOP:
NOP
NOP
MOV
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
#define
ENLVR
#define
LVD2V0
#define
LVD2V4
0C9H
0CAH
MAIN
0100H
SP, #5FH
P0M0, #00H
P0M1, #00H
P1M0, #00H
P1M1, #00H
P2M0, #00H
P2M1, #00H
P3M0, #00H
P3M1, #00H
P4M0, #00H
P4M1, #00H
P5M0, #00H
P5M1, #00H
WKTCL,#0FFH
WKTCH,#87H
PCON,#02H
=
0xff;
0x40
0x00
0x01
;
Set the power-down wake-up clock to be about 1 second
;MCU
enters power-down mode
//RSTCFG.6
//LVD@2.0V
//LVD@2.4V
-
- 92 -
Need help?
Do you have a question about the micro STC8A8K64D4 Series and is the answer not in the manual?