DAC output in STM32L151RCT6 MCU is not constant.
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