A controller for a power converter includes a switching control coupled to switch a power switch to regulate an output of the power converter. A sensor is coupled to receive a signal from a terminal of the controller that represents a line input voltage during at least a portion of an on time of the power switch, and an output voltage of the power converter during at least a portion of an off time of the power switch. The sensor is coupled to sample the signal from the terminal during the portion of the on time of the power switch and to generate a sample input line voltage signal. An output regulator is coupled between the sensor and the switching control to output an output regulation signal to the switching control. The switching control is coupled to switch the power switch in response to the output regulation signal.
展开▼