A control circuit controlling output current at the primary side of a power converter
is provided. A waveform detector generates a current-waveform signal. A discharge-time
detector detects a discharge-time of a secondary side switching current. An oscillator
generates an oscillation signal for determining the switching frequency of the
switching signal. An integrator generates an integrated signal by integrating an
average current signal with the discharge-time. The average current signal is generated
in response to the current-waveform signal. The time constant of the integrator
is correlated with the switching period of the switching signal, therefore the
integrated signal is proportional to the output current. An error amplifier amplifies
the integrated signal and provides a loop gain for output current control. A comparator
controls the pulse width of the switching signal in reference to the output of
the error amplifier. Therefore, the output current of the power converter can be regulated.