The present invention discloses a switching control circuit for a
primary-side controlled power converter. A voltage-waveform detector
produces a voltage-feedback signal and a discharge-time signal. A
current-waveform detector generates a current-waveform signal by
measuring a primary-side switching current. An integrator generates a
current-feedback signal by integrating the current-waveform signal with
the discharge time. A time constant of the integrator is correlated with
the switching frequency, thus the current-feedback signal is proportional
to an output current of the power converter. A PWM circuit controls the
pulse width of the switching signal in response to the outputs of a
voltage-loop error amplifier and a current-loop error amplifier. The
output voltage and the maximum output current of the power converter are
therefore regulated.