
GD32L23x User Manual
236
bit width (DWBW) bits in the DAC_CTL0 register.
LFSR noise wave mode: there is a Linear Feedback Shift Register (LFSR) in the DAC control
logic, it controls the LFSR noise signal which is added to the OUT_DH value, and then the
result is stored into the OUT_DO register When the configured DAC noise wave bit width is
less than 12, the noise signal equals to the LSB DWBW bits of the LFSR register, while the
MSB bits are masked.
Figure 14-2. DAC LFSR algorithm
9
7
8
6
5
4
3
2
1
11
10
0
X
6
X
0
X
4
X
XOR
X
12
NOR
12
Triangle noise mode: in this mode, a triangle signal is added to the OUT_DH value, and then
the result is stored into the OUT_DO register. The minimum value of the triangle signal is 0,
while the maximum value of the triangle signal is (2 << DWBW) - 1.
Figure 14-3. DAC triangle noise wave
(2<<DWBW)-1 +
OUT_DH value
OUT_DH value
14.3.7.
DAC output voltage
The analog output voltages on the DAC pin are determined by the following equation:
DAC
output
=V
REF+
*OUT_DO/4096 (14-1)