NEC PD703114 User Manual page 520

V850e/ia2 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 the voltage detection mode. In the 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.
These registers can be read or 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 an A/D conversion operation. If a write is
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
520
CHAPTER 11 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: Operates in normal mode
1: Operates in voltage detection mode
Sets voltage comparison detection.
0: Generates INTDETn interrupt if reference voltage value > analog input pin voltage.
1: Generates 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
×: Don't care
Remark
Sets reference voltage value to compare with analog input pin selected by DETANI3 to
DETANI0.
User's Manual U15195EJ5V0UD
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
ANI16
1
1
ANI17
×
×
Setting prohibited
0
Address
After reset
DET
FFFFF204H
0000H
CMP0
0
Address
After reset
DET
FFFFF244H
0000H
CMP0

Advertisement

Table of Contents
loading

Table of Contents