Can i generate the DAC output voltage as 0.9V ?
Because, with the REF voltage of the DAC mentioned as 1.5V and AVcc we are getting 0.75V and 1.5V peak to peak.
If I want to get DAC output as 0.9V what are the registers do i need to configure.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Can i generate the DAC output voltage as 0.9V ?
Because, with the REF voltage of the DAC mentioned as 1.5V and AVcc we are getting 0.75V and 1.5V peak to peak.
If I want to get DAC output as 0.9V what are the registers do i need to configure.
Hi Srinadh,
If your reference value is 1.5V then when the DAC value is 4096 (0xFFF) you will get 1.5V. If you want to limit to 0.9 V then you should use 2457 (0x999).
To get the DAC value the formula is: DAC Value = Target Voltage * 4096 / Reference Voltage. You will want to update the DAC12x_DAT register. I recommend looking at the User's Guide and the DAC12 section. DAC Example
Regards,
Luke
Hi,
For that we need to keep the fixed data value in the DAC, but in my application i need to use as variable data like GPS data.
Suggest any other way to get the peak as 0.9V peak with respect to internal ref voltages.
Hi Srinadh,
You can use variabled data for the DAC12_xDAT register, just do some data checking before assigning the value in the DAC12_xDAT register.
For example
uint16_t dacValue; uint16_t threshhold; //Vref value changes threshold = 0.9*4096/Vref; if(dacValue <= threshold) DAC12x_DAT = dacValue; //////////////// //or if you have static references you can define the VREF and change your conditional #define VREF_15 #ifdef VREF_15 if(dacValue <= 2457) DAC12_xDAT = dacValue; #ifdef VREF_25 if(dacValue <= 1474) DAC12_xDAT = dacValue;
The above is psuedocode but should help give you an idea on how you can make sure the DAC does not exceed 0.9V.
Regards,
Luke
**Attention** This is a public forum