set the voltage on the upper comparator to control the duty cycle. the upper comparator reads the voltage drop between the load and the power supply and controls the counter up or down. the counter output is converted to analog and the lower comparator converts this output to PWM