SN8P2977
8-Bit Micro-Controller with Regulator, PGIA, 24-bit ADC
SONiX TECHNOLOGY CO., LTD
Page 121
Version 1.7
13.7 LBTM: Low Battery Detect
SN8P2977 provided two different ways to measure VDD Voltage. One is from ADC reference voltage selection. It will
be more precise but take more time and a little bit complex. Another way is using build in Voltage Comparator via
internal or external input path to detect VDD voltage level. There are four internal level, 2.2V~3.6V can be set for low
battery detect, or via divide VDD voltage and connect to P1.0. Bit LBTO will output for indication of LBT status.
Comparator
LBTO
( Flag)
LBTSEL [3:0]
VBAT
P10
LBTEN
P11
P11IO
VDD
R1
R2
1xxx
0000
0001
0010
.
.
.
0111
C
V
BG
=
1.2V
LBTEN
LBT Voltage
LBTSEL [3:0]
0000: VBAT < 2.2V, LBTO=1.
0001: VBAT < 2.4V, LBTO=1.
0010: VBAT < 2.6V, LBTO=1.
0011: VBAT < 2.8V, LBTO=1.
0100: VBAT < 3.0V, LBTO=1.
0101: VBAT < 3.2V, LBTO=1.
0110: VBAT < 3.4V, LBTO=1.
0111: VBAT < 3.6V, LBTO=1.
1xxx: P10 < 1.2V, LBTO=1.
13.7.1
LBTM: Low Battery Detect Register
095H
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
LBTM
-
P11IO
LBTSEL3
LBTSEL2
LBTSEL1
LBTSEL0
LBTO
LBTENB
R/W
-
R/W
R/W
R/W
R/W
R/W
R
R/W
After Reset
-
0
0
0
0
0
0
0
Bit6:
P11IO:
Port 1.1 Input/LBT function control bit.
0 = Disable P11 as Input Port,
1 = Enable P11 as LBT function
Bit [5:2]:
LBTSL [3:0]:
Low Battery Detect Threshold Voltage.
LBTEN
LBTSL [3:0]
P11IO
LBT Voltage
Note
0
xxxx
X
x
LBT Disable
1
0000
0
VDD < 2.2V
Internal Input
1
0001
0
VDD < 2.4V
Internal Input
1
0010
0
VDD < 2.6V
Internal Input
1
0011
0
VDD < 2.8V
Internal Input
1
0100
0
VDD < 3.0V
Internal Input
1
0101
0
VDD < 3.2V
Internal Input
1
0110
0
VDD < 3.4V
Internal Input
1
0111
0
VDD < 3.6V
Internal Input
1
1xxx
1
P10 < 1.2V, LBTO=1
External Input
Bit1:
LBTO:
Low Battery Detect Output Bit.
0 = VDD voltage Higher than Set LBT Voltage.
1 = VDD voltage Lower than Set LBT Voltage.
(Note: After getting LBTO data, Please set LBTEN = 0 to disable LBT Low Battery Detect function.)
Bit0:
LBTENB:
Low Battery Detect mode control Bit.
0 = Disable Low Battery Detect function,
1 = Enable Low Battery Detect function