Push the button to connect the reference voltage.
It takes a scaled down voltage from the pot, and then subtracts it from a reference voltage to give the error. Then compares the error to a sawtooth wave to create a pwm signal, which drives the mosfet.
Comments and suggestions welcome.