Understand the basic principles of STM32DAC
Introduction
Only the high-capacity STM32F10x has DAC function
Features
① 2 DAC converters: each converter corresponds to 1 output channel
② 8-bit or 12-bit monotonic output
③ Left-aligned or right-aligned data in 12-bit mode
④ Synchronous update function
⑤ Noise waveform generation
⑥ Triangular waveform generation
⑦ Double DAC Channels are converted simultaneously or separately
⑧ Each channel has DMA function
DAC conversion principle
1. VDDA and VSSA are the power supply for the analog part of the DAC module.
2. Vref+ is the reference voltage of the DAC module.
3. DAC_OUTx is the output channel of the DAC (corresponding to the PA4 or PA5 pin)
DAC pin description
DAC_OUT1 ->PA4
DAC_OUT2 ->PA5
Conversion time
Data Format
Trigger method
Calculation formula
Explanation:
1. V_REF: is the voltage value we want to output
2. V_DOR: is the reference voltage (3.3V) 3.
2^12 = 4096;
DAC output = VREF ∗ (VDOR / 4096) DAC output =V_{REF}*(V_{DOR}/4096) D A C output an=VREF∗(VD The R/4096)