NEC UPD703116 User Manual page 650

32-bit single-chip microcontrollers
Table of Contents

Advertisement

(3) A/D voltage detection mode registers 0 and 1 (ADETM0, ADETM1)
The ADETMn registers are 16-bit registers that set voltage detection mode. In voltage detection mode, the
analog input pin for which voltage detection is being performed and a reference voltage value are compared
and an interrupt is set in response to the comparison result.
The ADETMn register can be read/written in 16-bit units.
When the higher 8 bits of the ADETMn register are used as the ADETMnH register, and the lower 8 bits are
used as the ADETMnL register, they can be read/written in 8-bit or 1-bit units.
Caution Do not write to an ADETMn register during A/D conversion operation.
performed, conversion is suspended and it subsequently terminates.
<15>
<14>
13
ADET
ADET
DET
ADETM0
EN0
LH0
ANI3
<15>
<14>
13
ADET
ADET
DET
ADETM1
EN1
LH1
ANI3
Bit position
Bit name
15
ADETENn
14
ADETLHn
13 to 10
DETANI3
to
DETANI0
9 to 0
DETCMP9
to
DETCMP0
Remark
n = 0, 1
650
CHAPTER 13 A/D CONVERTER
12
11
10
9
8
7
DET
DET
DET
DET
DET
DET
ANI2
ANI1
ANI0
CMP9
CMP8
CMP7
12
11
10
9
8
7
DET
DET
DET
DET
DET
DET
ANI2
ANI1
ANI0
CMP9
CMP8
CMP7
Specifies voltage detection mode.
0: Operate in normal mode
1: Operate in voltage detection mode
Sets voltage comparison detection.
0: Generate INTDETn interrupt if reference voltage value > analog input pin voltage.
1: Generate INTDETn interrupt if reference voltage value ≤ analog input pin voltage.
Selects analog input pin to compare to reference voltage value set by DETCMP9 to
DETCMP0 when in voltage detection mode.
DETANI3
DETANI2
0
0
0
0
0
0
0
0
0
1
0
1
0
1
0
1
×
1
×: Arbitrary
Remark
Sets reference voltage value to compare with analog input pin selected in DETANI3 to
DETANI0.
User's Manual U14492EJ5V0UD
6
5
4
3
2
1
DET
DET
DET
DET
DET
DET
CMP6
CMP5
CMP4
CMP3
CMP2
CMP1
6
5
4
3
2
1
DET
DET
DET
DET
DET
DET
CMP6
CMP5
CMP4
CMP3
CMP2
CMP1
Function
DETANI1
DETANI0
Voltage detection analog input pin
0
0
ANIn0
0
1
ANIn1
1
0
ANIn2
1
1
ANIn3
0
0
ANIn4
0
1
ANIn5
1
0
ANIn6
1
1
ANIn7
×
×
Setting prohibited
If a write is
0
Address
Initial value
DET
FFFFF204H
0000H
CMP0
0
Address
Initial value
DET
FFFFF244H
0000H
CMP0

Advertisement

Table of Contents
loading

Table of Contents