
S1C88409 TECHNICAL MANUAL
EPSON
185
CHAPTER 5: PERIPHERAL CIRCUITS AND OPERATION (D/A Converter)
5.19.4 Control of D/A converter
Initial settings
When using the D/A converter, it is necessary to
set up the terminals used for analog output from
the P36 and P37 initialized as the I/O port termi-
nals.
When using DA0 (P36) as the analog output
terminal, write "1" to the PDA6 register and "0" to
the PAD6 register.
When using DA1 (P37) as the analog output
terminal, write "1" to the PDA7 register and "0" to
the PAD7 register.
Do not set both the terminals as analog outputs
simultaneously.
The analog output terminal goes to AGND level
until the D/A conversion result is output.
D/A conversion operation
The DADR (DADR0–DADR7) register is used to
write 8-bit data to be D/A converted.
To start D/A conversion, write "1" to the DAE
register.
By this writing, data set in the DADR register is
converted into analog value and the conversion
result is output from the corresponding analog
output terminal.
The D/A converter takes a maximum 30 sec of
D/A conversion time until it outputs the conver-
sion result to the analog output terminal after
starting D/A conversion with the DAE register.
When "0" is written to the DAE register, the
corresponding analog output terminal goes to
AGND level.
Table 5.19.4.1 Analog output level on DA0 and DA1
DAE
0
1
DA0
DA1
AGND
D/A conversion output
Furthermore, when new data is written to the
DADR register keeping "1" of the DAE register, the
data is converted by this writing and the result is
output to the analog output terminal after a
maximum 30 sec have passed after the writing.
The following shows the analog output voltage
according to the data written in the DADR register
(0–255).
Output voltage
= AVREF
[Value set in DADR register] / 256 (V)
Note: When the status of the P37 (P36) terminal
is changed while DA0 (1) is outputting the
D/A conversion result, the DA0 (1) terminal
may change its output level.
The D/A converter has no built-in output
buffer, so use an external amplifier to drive
loads. In this case, make sure that the
amplifier input current is 1 A or less.
Writing to output data register (DADR)
DAE
Analog output
Conversion result
max. 30
sec
max. 30
sec
Fig. 5.19.4.1 Timing chart of D/A conversion