The present invention provides a method and circuit for detecting an input
voltage of a power converter. It includes a current sense circuit for
generating a current signal in response to a switching current of an
inductive device. A detection circuit is coupled to sense the current
signal for generating a slope signal in response to a slope of the
current signal. A signal generation circuit is further developed to
generate an input-voltage signal in accordance with the slope signal. The
level of the input-voltage signal is corrected to the input voltage of
the power converter.