
33
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3822 Group
MITSUBISHI MICROCOMPUTERS
A-D CONVERTER
[A-D Conversion Register (AD)] 0035
16
The A-D conversion register is a read-only register that contains
the result of an A-D conversion. When reading this register during
an A-D conversion, the previous conversion result is read.
[A-D Control Register (ADCON)] 003416
The A-D control register controls the A-D conversion process. Bits
0 to 2 of this register select specific analog input pins. Bit 3 signals
the completion of an A-D conversion. The value of this bit remains
at “0” during an A-D conversion, then changes to “1” when the A-
D conversion is completed. Writing “0” to this bit starts the A-D
conversion. Bit 4 controls the transistor which breaks the through
current of the resistor ladder. When bit 5, which is the AD external
trigger valid bit, is set to “1”, this bit enables A-D conversion even
by a falling edge of an ADT input. Set ports which share with ADT
pins to input when using an A-D external trigger.
[Comparison Voltage Generator]
The comparison voltage generator divides the voltage between
AVSS and VREF by 256, and outputs the divided voltages.
[Channel Selector]
The channel selector selects one of the input ports P67/AN7–P60/
AN0, and inputs it to the comparator.
[Comparator and Control Circuit]
The comparator and control circuit compares an analog input volt-
age with the comparison voltage and stores the result in the A-D
conversion register. When an A-D conversion is completed, the
control circuit sets the AD conversion completion bit and the AD
interrupt request bit to “1”.
Note that the comparator is constructed linked to a capacitor, so
set f(XIN) to at least 500 kHz during A-D conversion.
Use the clock divided from the main clock XIN as the internal clock
φ.
Fig. 31 A-D converter block diagram
Fig. 30 Structure of A-D control register
-
c
o
n
t
r
o
r
e
g
s
t
e
r
(
A
D
C
O
N
:
a
d
d
r
e
s
s
0
0
3
4
1
6)
c
o
n
v
e
r
s
o
n
c
o
m
p
e
t
o
n
t
0
:
C
o
n
v
e
r
s
i
o
n
i
n
p
r
o
g
r
e
s
s
1
:
C
o
n
v
e
r
s
i
o
n
c
o
m
p
l
e
t
e
d
n
a
o
g
n
p
u
t
p
n
s
e
e
c
t
o
n
t
s
0
0
0
:
P
60/
A
N0
0
0
1
:
P
61/
A
N1
0
1
0
:
P
62/
A
N2
0
1
1
:
P
63/
A
N3
1
0
0
:
P
64/
A
N4
1
0
1
:
P
65/
A
N5
1
1
0
:
P
66/
A
N6
1
1
1
:
P
67/
A
N7
R
E
F
n
p
u
t
s
w
t
c
t
0
:
O
F
F
1
:
O
N
externa
tr
gger va
t
0 : A-D external trigger invalid
1 : A-D external trigger valid
7
0
n
t
e
r
r
u
p
t
s
o
u
r
c
e
s
e
e
c
t
o
n
t
0
:
I
n
t
e
r
r
u
p
t
r
e
q
u
e
s
t
a
t
A
-
D
c
o
n
v
e
r
s
i
o
n
c
o
m
p
l
e
t
e
d
1
:
I
n
t
e
r
r
u
p
t
r
e
q
u
e
s
t
a
t
A
D
T
i
n
p
u
t
f
a
l
l
i
n
g
o
t
u
s
e
r
e
t
u
r
n
s
“
0
”
w
e
n
r
e
a
omparator
-
contro
c
rcu
/
-
n
t
e
r
r
u
p
t
r
e
q
u
e
s
t
S
R
E
F
6
0/
0
a
t
a
u
-
c
o
n
t
r
o
r
e
g
s
t
e
r
7
0
-
convers
on
register
es
stor
a
e
C
h
a
n
n
e
l
s
e
l
e
c
t
o
r
6
7/
7
6
6/
6
6
5/
5
6
4/
4
6
3/
3
6
2/
2
6
1/
1
5
7/
8
3
Comentarios a estos manuales