In a power supply including a transformer, a PWM controller, a primary power transistor, a first MOSFET synchronous rectifier connected to the transformer, a clock signal generator, and a control circuit coupled to a control gate of the first MOSFET synchronous rectifier, a method for generating a control signal to drive the control gate of the first MOSFET synchronous rectifier, the method comprising:
- accepting an anticipation signal at a terminal of the control circuit;
- generating an internal clock signal within the control circuit;
- counting a first number of pulses of the internal clock signal that are generated during a first period of the clock signal;
- subtracting the anticipation signal from the first number of pulses of the internal clock signal to produce a second number;
- counting the second number of pulses of the internal clock signal beginning at a subsequent period of the clock signal;
- and
- outputting the control signal when the second number of pulses of the internal clock signal are counted.