![ARTERY AT32F435 Series Скачать руководство пользователя страница 388](http://html1.mh-extra.com/html/artery/at32f435-series/at32f435-series_reference-manual_2977592388.webp)
AT32F435/437
Series Reference Manual
2022.11.11
Page 388
Rev 2.03
19
Digital-to-analog converter (DAC)
19.1 DAC introduction
The DAC uses a 12-bit digital input to generate an analog output between 0 and reference voltage. The
digital part of the DAC can be configured in 8-bit or 12-bit mode and can be used in conjunction with the
DMA. It supports left or right alignment in a single /dual DAC modes. It has two output channels, DAC1
and DCA2, with its own converter each. Each DAC1/DAC2 can be converted independently or
simultaneously in dual DAC mode. The input reference voltage V
REF+
makes conversion more accuracy.
Figure 19-1 DAC1/DAC2 block diagram
APB BUS
APB BUS
TRIG
Select1
TRIG
Select2
LFSR
Triangle
LFSR
Triangle
Control Logic1
Control Logic2
Clock
Generator1
Clock
Generator2
D/A
转换
1
D/A
转换
2
TMR6_TRGO
TMR8_TRGO
...
EXINT_9
SWTRIG1
TMR6_TRGO
TMR8_TRGO
...
EXINT_9
SWTRIG2
D1TRGSEL
D2TRGSEL
D1DMAEN
D2DMAEN
DMA_req1
DMA_req2
TRIG1
TRIG2
12
12
D
1NM
D
1N
BS
EL
D
1T
RG
EN
D
1NM
D
1N
BS
EL
D
1T
RG
EN
D1OBDIS
D2OBDIS
DAC
OUT1
DAC
OUT2
19.2 DAC main features
A single/dual DAC 8-bit or 12-bit digital input
Left or right data alignment
Noise-wave/Triangular-wave generation
Dual DAC or single DAC1/DAC2 independent conversions
DMA mode for DAC1/DAC2
Software or external triggers for conversion
Input reference voltage V
REF+
19.3 Design tips
The following information can be used as DAC design reference:
Analog module configuration
The analog part of the DAC1/DAC2 can be enabled by setting the ENx bit in the DAC_CTRL
register, but its digital part is not subject to this bit. The DAC integrates two output gains that can
be used to reduce the output impedance, and to drive external loads directly without the need of
an external operational amplifier. The DAC1/DAC2 output gain can be enabled and disabled
through the DxOBDIS bit in the DAC_CTRL register.
DMA capability
The DAC1/DAC2 both have a DMA capability that can be enabled by setting the DxDMAEN bit in
the DAC_CTRL register. One DMA request is generated when a trigger signal is active while the
DxTRGEN bit is set. The DAC DMA request is not added up, meaning the new DAM request will
be ignored and no error is reported.
In dual DAC mode, the application can handle two channels (DAC1/DAC2) by using only one DMA
request and a DMA channel.