I have a buck regulator (say the TPS82085) which I would like to use to regulate a 5V supply to various values ranging from 1.2V to 3.3V. It seems that a DAC is a good way to do it (I initially thought of using a resistor network since I only need to adjust it in 300mV steps but then realized I was just building a large, crappy and expensive 3-bit DAC). This is the feedback circuit I envision:
simulate this circuit – Schematic created using CircuitLab
My goal is to make it so that if I set the DAC to 0V, then I would have a 3.3V output, and if I set the DAC to 3.3V (its maximum value as it will be supplied by a 3.3V rail) then I would have a 1.2V output. The point is to make sure the downstream voltage cannot exceed 3.3V (or go below 1.2V) should the DAC be misconfigured by software. Also it gives my DAC maximum resolution.
From what I know, regulators with a feedback pin try to adjust Vout until the voltage at the feedback pin is equal to some reference voltage inside the device. For this regulator, the reference voltage is 0.8V.
By applying Kirchhoff's laws to the circuit, the voltage at the FB pin can be found to be given by
$$V_{FB} = \frac{R_2 R_3 V_\mathrm{out} + R_1 R_3 V_\mathrm{DAC}}{R_2 R_3 + R_1 R_2 + R_1 R_3}$$
So if the regulator works to force that to 0.8V, the steady-state operation of the regulator obeys
$$V_\mathrm{out} = 0.8V \left [ 1 + \frac{R_1}{R_3} + \frac{R_1}{R_2} \right ] - \frac{R_1}{R_2} V_\mathrm{DAC}$$
If I add the constraints that Vdac = 0V implies Vout = 3.3V and Vdac = 3.3V implies Vout = 1.2V then one can solve the resulting system of equations to find that the solutions are of the form
$$R_2 = 1.571429 \cdot R_1$$ $$R_3 = 0.401826 \cdot R_1$$
So for instance R1 = 100K, R2 = ~157K, R3 = ~40K would achieve the intended effect, as would any multiple of those values.
My question therefore is, is this a standard way to use a DAC to adjust regulator output voltage, and are those the calculations I should be making to find correct resistor values? Or are there additional factors that I should be taking into account? (other than resistor tolerances and Vref min/max values of course)
Maybe it's a good idea to account for the DAC output becoming high-impedance somehow? (Vout = 2.8V in this eventuality)