Patent ID: 8247981

Claim:
An integrated circuit, comprising: a controller for controlling a power switch, the controller set to operate in one of operation modes, the operation modes comprising a first operation mode and a second operation mode; a multi-function pin for connecting an external resistor; a mode determination circuit for detecting a signal representing a resistance of the external resistor from the multi-function pin, and thus indicating the controller to operate in a first operation mode if the resistance within a first range or operate in a second operation mode if the resistance within a second range, wherein the operation modes are used for power conversion; and a voltage setting circuit for setting voltage of the multi-function pin to approximately a first fixed voltage before the mode determination circuit indicates the controller to operate in the first operation mode or the second operation mode, for setting the voltage of the multi-function pin to approximately a second fixed voltage after the mode determination circuit indicates the controller to operate in the first operation mode, and for setting the voltage of the multi-function pin to approximately a third fixed voltage after the mode determination circuit indicates the controller to operate in the second operation mode, wherein the first fixed voltage is between the second fixed voltage and the third fixed voltage.