2021-03-22 09:41 PM
Hi,
I am using STM32L151RCT6 MCU and creating the project in STM32cube IDE .
i implemented DAC peripheral and kept 1.52 As input and did calculation like:
float value = 1.52; // Dac output
uint32_t var;
var = (value * 4096)/3.3 ; // From datasheet
HAL_DAC_SetValue(&hdac, DAC_CHANNEL_1, DAC_ALIGN_12B_R, var);
i am getting output voltage as 1.55V to 1.56V ..
here my requirement is 1.55V but i am getting output varying from 1.55V to 1.56V...why that variation in output of DAC?
How can i make it constant ??
or it will like that or what??
Please help me to clear this
2021-03-22 11:51 PM
What hardware are you using? How is DAC loaded? Are there ADC conversions running? Our any other code influencing the analog part of the mcu, or introducing significant supply/ground current? Isn't it the measurement which is imprecise/noisy?
DAC stability among other things depends on VREF+ stability.
JW
2021-03-22 11:55 PM
And - 10mV of a 1500mV signal is about 0.5%.
About what measurement device tolerance we are speaking here ?
2021-03-23 01:54 AM
Hi,
I am using NUCLEO- L152RE - Evaluation board..
used DAC 1 out:
i am not using any ADC..
just DAC1 out pin probing and checking the waveform along with output voltage.
2021-03-23 01:55 AM
this is configuration image
2021-03-23 01:57 AM
2021-03-23 02:10 AM
What is the tolerance of the device you are measuring the signal with ?
Your expectations sound unrealistic to me.
The DAC output is high-impedance (1 Mohm/15kOhm), the measurement device must have an appropriately high input inpedance.