
μ
PD17016, 17017
212
17. D/A CONVERTER (DAC)
The D/A converter (DAC) outputs its signal by means of PWM (Pulse Width Modulation) that varies the duty
factor.
By connecting an external lowpass filter to the D/A converter, digital signals can be converted into analog
signals.
17.1 Configuration of D/A Converter
Figure 17-1 shows the block diagram of the D/A converter.
As shown in the figure, the D/A converter consists of an output select block and a duty setting block for each
pin, and a clock generation block.
Figure 17-1. Block Diagram of D/A Converter
17.2 Functional Outline of D/A Converter
The D/A converter outputs a variable-duty signal to each output pin.
The output frequency is 878.9 Hz, and the duty factor can be changed in 256 steps.
The following subsections 17.2.1 through 17.2.3 outlines the function of each block of the D/A converter.
17.2.1 Output select blocks
The output select blocks specify whether each pin is used as a general-purpose output port pin or a D/A
converter pin.
The mode of each pin is selected by the PWM pin setting software macro supplied with the device file (refer
to
17.3
).
17.2.2 Duty setting blocks
The duty setting blocks output a signal whose duty factor can be changed in 256 steps.
The duty factor of each output pin is independently set by the PWM data register (PWMR0 or PWMR1:
peripheral address 05H or 06H) via the data buffer.
17.2.3 Clock generation block
The clock generation block generates a basic clock that is used to set the duty factor of the output signal.
The generated clock frequency f
PWM
is 225 kHz (refer to
17.4
).
Control register
Output select
block
P1B
2
/PWM
1
Duty setting
block
Data buffer
f
PWM1
Clock
generation
block
f
PWM0
Output select
block
P1B
1
/PWM
0
Duty setting
block