34
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
3827 Group
MITSUBISHI MICROCOMPUTERS
D-A CONVERTER
The 3827 group has an on-chip D-A converter with 8-bit resolution
and 2 channels (DAi (i=1, 2)). The D-A converter is performed by
setting the value in the D-A conversion register. The result of D-A
converter is output from DAi pin. When using the D-A converter,
the corresponding port direction register bit (P5
6
/DA
1
, P5
7
/DA
2
)
should be set to “0” (input status).
The output analog voltage V is determined by the value n (base
10) in the D-A conversion register as follows:
V=V
REF
n/256 (n=0 to 255)
Where V
REF
is the reference voltage.
At reset, the D-A conversion registers are cleared to “00
16
”, the
DAi output enable bits are cleared to “0”, and DAi pin goes to
high impedance state. The DA output is not buffered, so connect
an external buffer when driving a low-impedance load.
Fig. 35 Structure of D-A control register
Fig. 36 Block diagram of D-A converter
Fig. 37 A-D converter, D-A converter block diagram
DA
1
output enable bit/DA
1
V
REF
ON/OFF switch
DA
2
output enable bit/DA
2
V
REF
ON/OFF switch
Not used (return “0” when read)
0 : Output disabled/OFF
1 : Output enabled/ON
b7
b0
D-A control register
(DACON : address 0036
16
)
D-A1 conversion register (0034
16
)
D-A2 conversion register (0035
16
)
P5
6
/DA
1
P5
7
/DA
2
Data bus
D-A i conversion register (8)
R-2R resistor ladder
DA i output enable bit
V
REF
Resistor ladder
A-D conversion register
(10 bits)
D-A1 conversion register (8 bits)
D-A2 conversion register (8 bits)
R-2R resistor ladder
R-2R resistor ladder
D-A2 output
D-A1 output
(P5
6
)
(P5
7
)
D-A2 output enable switch
D-A2 V
REF
ON/OFF switch
D-A1 output enable switch
D-A1 V
REF
ON/OFF switch
V
REF
input
ON/OFF switch
Internal: D-A output
External: V
REF
Reference voltage input select switch