M16C/62P Group (M16C/62P, M16C/62PT)
6. Voltage Detection Circuit
Rev.2.41
Jan 10, 2006
Page 47 of 390
REJ09B0185-0241
Figure 6.3
D4INT Register
Low Voltage Detection Interrupt Register
(1)
Symbol
Address
After Reset
D4INT
001Fh
00h
Bit Symbol
Bit Name
Function
RW
NOTES :
1.
2.
3.
4.
5.
b7 b6 b5 b4 b3 b2 b1 b0
D40
Low Voltage Detection Interrupt
Enable Bit
(5)
0 : Disable
1 : Enable
RW
D41
STOP Mode Deactivation Control
Bit
(4)
0 : Disable (do not use the Low voltage
detection interrupt to get out of stop
mode)
1 : Enable (use the low voltage detection
interrupt to get out of stop mode)
RW
D42
Voltage Change Detection Flag
(2)
0 : Not detected
1 : Vdet4 passing detection
RW
(3)
D43
WDT Overflow Detect Flag
0 : Not detected
1 : Detected
RW
(3)
DF0
Sampling Clock Select Bit
b5 b4
0 0 : CPU clock divided by 8
0 1 : CPU clock divided by 16
1 0 : CPU clock divided by 32
1 1 : CPU clock divided by 64
RW
DF1
RW
—
(b7-b6)
Nothing is assigned. When w rite, set to “0”.
When read, their contents are “0”.
—
Write to this register after setting the PRC3 bit in the PRCR register to “1” (w rite enable).
Useful w hen the VC27 bit in the VCR2 register is set to “1” (low voltage detection circuit enabled). If the VC27 bit is
set to “0” (low voltage detection circuit disabled), the D42 bit is set to “0” (Not detect).
This bit is set to “0” by w riting a “0” in a program. (Writing a “1” has no effect.)
If the low voltage detection interrupt needs to be used to get out of stop mode again after once used for that
purpose, reset the D41 bit by w riting a “0” and then a “1”.
The D40 bit is effective w hen the VC27 bit = 1. To set the D40 bit to “1”, set bits in the follow ing order.
(a) Set the VC27 bit to “1”.
(b) Wait for td(E-A) until the detection circuit is actuated.
(c) Wait for the sampling time. (See
Table 6.2 Sam pling Period
.)
(d) Set the D40 bit to “1”.
http://www.xinpian.net
提供单片机解密、IC解密、芯片解密业务
010-62245566 13810019655