
28
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
MITSUBISHI MICROCOMPUTERS
38C8 Group
A-D CONVERTER
[A-D Conversion Registers (ADL, ADH)] 0032
16,
0033
16
The A-D conversion registers are read-only registers that contain the
result of an A-D conversion. During A-D conversion, do not read these
registers.
[A-D Control Register (ADCON)] 003116
The A-D control register controls the A-D conversion process. Bits 0
to 2 are analog input pin selection bits. Bit 3 is an A-D conversion
completion bit and “0” during A-D conversion, then changes to “1”
when the A-D conversion is completed. Writing “0” to this bit starts
the A-D conversion. When bit 5, which is the A-D external trigger
valid bit, is set to “1”, A-D conversion is started even by a rising edge
or falling edge of an ADT input.
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 con-
trol circuit sets the A-D conversion completion bit and the A-D inter-
rupt request bit to “1”.
Because the comparator consists of a capacitor coupling, a deficient
conversion speed may cause lack of electric charge and make the
conversion accuracy worse. When A-D conversion is performed, set
f(XIN) to at least 500 kHz.
When both bit 5 and bit 4 of the CPU mode register are set to “1”,
A-D conversion is performed by using the built-in self-oscillation
circuit.
Trigger Start
When using the A-D external trigger, set the port shared with the
ADT pin to input. The polarity of INT1 interrupt edge also applies to
the A-D external trigger. When the INT1 interrupt edge polarity is
switched after an external trigger is validated, an A-D conversion
may be started.
Fig. 26 A-D converter block diagram
Fig. 25 Structure of A-D control register
Resistor ladder
The resistor ladder outputs the comparison voltage by dividing the
voltage between VDD and VSS by resistance.
Channel Selector
The channel selector selects one of the ports P33/AIN3–P30/AIN0 and
ports P10/AIN4–P13/AIN7, and inputs it to the comparator.
-
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
1
1
6)
n
a
o
g
n
p
u
t
p
n
s
e
e
c
t
o
n
t
s
0
0
0
:
P
3
0/
AI
N
0
0
0
1
:
P
31/
AI
N1
0
1
0
:
P
32/
AI
N2
0
1
1
:
P
33/
AI
N3
1
0
0
:
P
10/
AI
N4
1
0
1
:
P
11/
AI
N5
1
1
0
:
P
12/
AI
N6
1
1
1
:
P
13/
AI
N7
7
0
7
9
8
7
6
5
4
3
2
9
8
7
6
5
4
3
2
•
8
-
b
i
t
r
e
a
d
(
R
e
a
d
o
n
l
y
a
d
d
r
e
s
s
0
0
3
21
6.
)
-
convers
on reg
ster
ow-or
er
(ADL: Address 003216)
•10-bit read (Read address 003316 first.)
ote:
g
-or
er 6
ts o
a
ress 003316
ecomes “0” at rea
ng.
1
0
0
-
convers
on reg
ster
ow-or
er
(ADL: Address 003216)
-
convers
on reg
ster
g
-or
er
(ADH: Address 003316)
7
0
7
0
-
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
o
t
u
s
e
r
e
t
u
r
n
“
0
”
w
e
n
r
e
a
-
e
x
t
e
r
n
a
t
r
g
g
e
r
v
a
t
0
:
A
-
D
e
x
t
e
r
n
a
l
t
r
i
g
g
e
r
i
n
v
a
l
i
d
1
:
A
-
D
e
x
t
e
r
n
a
l
t
r
i
g
g
e
r
v
a
l
i
d
ot use
return “0” w
en rea
A
-
D
c
o
n
t
r
o
l
c
i
r
c
u
i
t
VSS
b7
b
0
3
P30/AIN0
P31/AIN1
P32/AIN2
P33/AIN3
P10/AIN4
P11/AIN5
P12/AIN6
P13/AIN7
10
P
41/
I
N
T1/
A
D
T
(
H
)
(
L
)
VCC
D
a
t
a
b
u
s
A-D control register
A-D conversion register
Resistor ladder
C
o
m
p
a
r
a
t
e
r
A
-
D
i
n
t
e
r
r
u
p
t
r
e
q
u
e
s
t
C
h
a
n
n
e
l
s
e
l
e
c
t
o
r
A
-
D
c
o
n
v
e
r
s
i
o
n
r
e
g
i
s
t
e
r
Commenti su questo manuale