Patent Publication Number: US-9852860-B2

Title: Parameter setting circuit of a power conversion apparatus and a method for generating a current

Description:
CROSS-REFERENCE TO RELATED APPLICATION 
     This application claims the priority benefit of Taiwan application serial no. 104136786, filed on Nov. 9, 2015. The entirety of the above-mentioned patent application is hereby incorporated by reference herein and made a part of this specification. 
     BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The invention relates to a parameter setting circuit and a method for generating a current, and particularly relates to a parameter setting circuit and a method for generating a current for a power conversion apparatus. 
     2. Description of Related Art 
     Generally speaking, an electronic circuit usually requires a parameter setting circuit to generate a current that is set based on the practical design requirement. Such parameter setting circuit normally sets a current by coupling a resistor to a specific voltage or a ground voltage. Conventionally, an internal resistor of the parameter setting circuit is serially coupled to an external setting impedor externally connected with the parameter setting circuit, and the resistor string is used to divide a specific voltage to generate a setting current. However, a current value of the setting current generated based on above may be deviated since the resistance value of the internal resistor cannot be determined accurately. 
     In the conventional art, different pins are provided in the parameter setting circuit to be respectively coupled to the specific voltage and the external setting impedor and used with different circuit structure designs to generate the setting current, so as to solve this issue. However, the manufacturing cost of the circuit may thus be increased. 
     SUMMARY OF THE INVENTION 
     The invention provides a parameter setting circuit for a power conversion apparatus. The parameter setting circuit is configured to provide the power conversion apparatus with a setting parameter. 
     The invention provides a method for generating a current capable of accurately generating a setting current. 
     A parameter setting circuit according to an embodiment of the invention is coupled to an external setting impedor. The parameter setting circuit includes a switch unit  440 , an internal parameter adjustment unit, and a setting unit. The switch unit is coupled to the external setting impedor. The internal parameter adjustment unit is coupled to the switch unit. The internal parameter adjustment unit includes a setting reference unit. The setting reference unit is coupled to the external setting impedor through the switch unit. The internal parameter adjustment unit provides an adjustment parameter through an operation of the switch unit based on a predetermined parameter ratio, the external setting impedor, and the setting reference unit. The setting unit is coupled to the switch unit. The setting unit generates a setting current based on the operation of the switch unit. The setting current is a combination of an adjustment current and an initial setting current. Generation of the adjustment current is related to the adjustment parameter. 
     According to an embodiment of the invention, the internal parameter adjustment unit further includes a voltage dividing circuit. The voltage dividing circuit presents the predetermined parameter ratio by using a reference voltage that is provided. Also, the internal parameter adjustment unit also includes a comparator. An input end of the comparator s coupled to the voltage dividing circuit and a first end of the setting reference unit, and the comparator outputs a comparison result. The comparator adjusts an end voltage of the first end based on the comparison result. 
     According to an embodiment of the invention, a control signal periodically controls the switch unit. The comparator periodically compares and adjusts the end voltage based on the comparison result. 
     According to an embodiment of the invention, the setting reference unit is a variable resistor. The comparator controls a resistance value of the variable resistor based on the comparison result to change the end voltage. 
     According to an embodiment of the invention, when the end voltage is equal to the reference voltage, a ratio between the external setting impedor and the variable resistor is equal to the predetermined parameter ratio. 
     According to another embodiment of the invention, the internal parameter adjustment unit further includes a variable current source. The variable current source provides a variable current, and is coupled to the setting reference unit to adjust the variable current based on the comparison result, so as to change the end voltage. 
     According to another embodiment of the invention, the compensation current is changed based on a current value of the variable current. 
     According to another embodiment of the invention, the external setting impedor is coupled to a first voltage to output a first current. The current generating circuit further includes a current mirror circuit. The current mirror circuit includes a first end and a second end. The first end is coupled to the compensation current source and the external setting impedor. The current mirror circuit is configured to mirror the compensation current and the first current from the first end to the second end, so as to generate the setting current. 
     A parameter setting circuit for a power conversion apparatus according to an embodiment of the invention is coupled to a first end of an external setting impedor. A second end of the external setting impedor is coupled to a first voltage. The parameter setting circuit includes a switch unit  440 , an internal parameter adjustment unit, and a setting unit. The switch unit is coupled to the external setting impedor. The internal parameter adjustment unit has a predetermined parameter ratio and a setting reference unit. The setting reference unit is coupled to the switch unit. The internal parameter adjustment unit adjusts the setting reference unit based on an operation of the switch unit, the external setting impedor, the setting reference unit, the first voltage, and the predetermined parameter ratio, and provides a setting parameter based on the adjusted setting reference unit. The setting unit is coupled to the switch unit and generates a setting current based on the first voltage, the external setting impedor, and the setting parameter. 
     According to an embodiment of the invention, the setting reference unit is coupled to the external setting impedor through the switch unit. A control signal periodically controls the switch unit to compare and adjust the setting reference unit. 
     According to another embodiment of the invention, the internal parameter adjustment unit includes a voltage dividing circuit. The voltage dividing circuit provides a reference voltage to present the predetermined parameter ratio, and the setting reference unit is a variable resistor having a first end. The first end has an end voltage. The internal parameter adjustment unit includes a comparator configured to compare the reference voltage and the end voltage, output a comparison result, and adjusts the variable resistor based on the comparison result. 
     According to an embodiment of the invention, when a ratio between the external setting impedor and the variable resistor is equal to the predetermined parameter ratio, the internal parameter adjustment unit provides the setting parameter based on the adjusted variable resistance. 
     According to another embodiment of the invention, the setting unit includes a compensation current source. The compensation current source provides compensation current based on the setting parameter. 
     According to another embodiment of the invention, the internal parameter adjustment unit includes a setting reference unit and a first current generating circuit. The first current generating circuit generates a first current based on the operation of the switch unit, the external setting impedor, the setting reference unit, and the first voltage. 
     According to another embodiment of the invention, the setting reference unit includes a second current generating circuit and a comparator. The second current generating circuit is coupled to the comparator, and the comparator adjusts a compensation current source by using the first current, so as to provide the setting parameter. 
     According to another embodiment of the invention, the external setting impedor provides a first current. The setting unit includes a current mirror circuit. The current mirror circuit includes a first end and a second end. The first end is coupled to the compensation current source and the external setting impedor. The current mirror circuit is configured to mirror the compensation current and the first current from the first end to the second end, so as to generate the setting current. 
     A method for generating a current according to an embodiment of the invention is adapted for a parameter setting circuit coupled to an external setting impedor. The external setting impedor is coupled to an external voltage to output a first current. The method for generating the current includes: comparing a reference voltage and an end voltage of an end of a reference resistor to obtain a comparison result; adjusting the end voltage based on the comparison result; obtaining a setting parameter based on the adjusted end voltage; and generating a setting current based on compensation current. The compensation current is generated based on a first current and the setting parameter. 
     According to an embodiment of the invention, in the step of comparing the reference voltage and the end voltage of the end of the reference resistor, the reference voltage and the end voltage are compared periodically based on a control signal. 
     According to an embodiment of the invention, the step of adjusting the end voltage based on the comparison result includes changing the end voltage by adjusting a resistance value of the reference resistor, such that the reference voltage and the end voltage are substantially equal. 
     According to an embodiment of the invention, the step of adjusting the end voltage based on the comparison result includes changing the end voltage by adjusting a current value of a variable current coupled to the reference resistor, such that the reference voltage and the end voltage are substantially equal. 
     According to an embodiment of the invention, the step of generating the setting current based on the compensation current includes: mirroring the compensation current and the first current from a first end of a current mirror circuit to a second end of the current mirror circuit, so as to generate the setting current. A current value of the compensation current is determined based on a current value of a second current. The current value of the second current is determined by the setting parameter. 
     In order to make the aforementioned and other features and advantages of the invention comprehensible, several exemplary embodiments accompanied with figures are described in detail below. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
       The accompanying drawings are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification. The drawings illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention. 
         FIG. 1A  is a block view illustrating a parameter setting circuit of the invention. 
         FIG. 1B  is a schematic view illustrating the parameter setting circuit of the invention. 
         FIG. 2  is a schematic circuit view illustrating a parameter setting circuit according to an embodiment of the invention. 
         FIG. 3  is a schematic waveform diagram illustrating a control signal of the parameter setting circuit in the embodiment of  FIG. 2  and the resistance value of a variable resistor thereof. 
         FIG. 4  is a flowchart illustrating a method for generating a current according to an embodiment of the invention. 
         FIG. 5  is a schematic circuit view illustrating a parameter setting circuit according to another embodiment of the invention. 
         FIG. 6  is a schematic waveform diagram illustrating a control signal of the parameter setting circuit and an end voltage of an input end of a comparator in the embodiment of  FIG. 5 . 
         FIG. 7  is a flowchart illustrating a method for generating a current according to another embodiment of the invention. 
         FIG. 8  is a flowchart illustrating a method for generating a current of the invention. 
     
    
    
     DESCRIPTION OF THE EMBODIMENTS 
     Reference will now be made in detail to the present preferred embodiments of the invention, examples of which are illustrated in the accompanying drawings. Wherever possible, the same reference numbers are used in the drawings and the description to refer to the same or like parts. 
     Several embodiments are provided below to describe the invention. However, the invention is not limited to the embodiments described herein. Also, the embodiments can be properly combined. Throughout the specification (including claims) of the invention, the term “couple” may refer to any direct or indirect connection means. For example, if it is described that a first device is coupled to a second device, it shall be interpreted that the first device may be directly connected to the second device or indirectly connected to the second device through another device or through a connection means. Moreover, the terra “resistor” may refer to at least one resistor, a resistance network, a capacitor, an inductor, or any element that provides a resistance value. 
       FIG. 1A  is a block view illustrating a parameter setting circuit of the invention. Referring to  FIG. 1 , a parameter setting circuit  400  of the invention is a parameter setting circuit of a power conversion apparatus, for example. The parameter setting circuit  400  includes a switch unit  440 , an internal parameter adjustment unit  450 , and a setting unit  420 . The parameter setting circuit  400  is coupled to a first end of an external setting impedor  500 . A second end of the external setting impedor  500  is coupled to the first voltage V IN . The switch unit  440  is coupled to the external setting impedor  500 . In the present embodiment, the external setting impedor  500  is an element having an electrical impedance, and the electrical impedance is the measure of the opposition that a circuit presents to a current when a voltage is applied. The setting unit  420  is coupled to the switch unit  440 . The internal parameter adjustment unit  450  has a predetermined parameter ratio  452  and a setting reference unit  454 . The setting reference unit  454  is coupled to the switch unit  440 . Also, the reference setting circuit  400  is coupled to the external setting impedor through the switch unit  440 . The predetermined parameter ratio  452  is a resistance ratio, a current ratio, or a voltage ratio, for example. However, the invention does not intend to impose a limitation in this regard. 
     Specifically, the internal parameter adjustment unit  450  adjusts the setting reference unit  454  according to the operation of the switch unit  440 , the external setting impedor  500 , the setting reference unit  454 , the first voltage V IN , and the predetermined parameter ratio  452 . The internal parameter adjustment unit  450  provides a setting parameter based on the adjusted setting reference unit  454 . In this embodiment, a control signal S periodically controls the switch unit  440  to adjust the setting reference unit  454 . 
       FIG. 1B  is a schematic view illustrating the parameter setting circuit according to an embodiment of the invention. Referring to  FIG. 1B , a reference setting circuit  100  includes a switch unit  140 , an internal parameter adjustment unit  150 , and a setting unit  120 . The switch unit  140  is coupled to the external setting impedor XR T . The internal parameter adjustment unit  150  is coupled to the switch unit  140 . The setting unit  120  is coupled to the switch unit  140 . For example, the reference setting circuit  100  may be coupled to the first voltage V IN  through a pin  130  and an external setting impedor XR T . X here is a predetermined parameter ratio based on the practical design requirement. However, the invention does not intend to impose a limitation in this regard. The predetermined parameter ratio X is a predetermined resistance ratio, for example. 
     Specifically, in this embodiment, the switch unit  140  includes switches  131  and  133  respectively controlled by control signals S 1  and S 2 . The control signals S 1  and S 2  are in inverted phases. In this embodiment, the control signal S 2  is obtained by inverting the control signal S 1 , for example. However, the invention does not intend to impose a limitation in this regard. In this embodiment, the internal parameter adjustment unit  150  includes a voltage dividing circuit  152 , a setting reference unit R IN , and a comparator  110 . The voltage dividing circuit  152  provides a reference voltage V R . The setting reference unit R IN  has an adjustable end voltage V c . An input end of the comparator is coupled to the voltage dividing circuit  152  and the setting reference unit R IN . The comparator  110  is configured to compare the reference voltage V R  and the end voltage V c  and output a comparison result. The comparator  110  adjusts the end voltage V c  based on the comparison result. In this embodiment, the setting reference unit R IN  may be a resistor or a resistance network formed of a plurality of resistors. The invention does not intend to impose a limitation on the configuration of the setting reference unit R IN . 
     In this embodiment, when the switch  131  is turned on, the switch  133  is not turned on. Here, the comparator  110  is configured to compare the reference voltage V R  of an internal resistor R X  and the end voltage V c  of the setting reference unit R IN  (referred to as reference resistor R IN  in the following) of the parameter setting circuit  100 , and the resistance value of the reference resistor R IN  is adjusted based on a comparison result. Alternatively, in an embodiment, the comparator  110  may also adjust the current value of a variable current provided by a variable current source (not shown in  FIG. 1B ) of the internal parameter adjustment unit  150  based on the comparison result. The invention does not intend to impose a limitation in this regard. Then, in this embodiment, the setting unit  120  includes compensation current sources  121  and  122  respectively providing compensation currents I OFS1 /X and I OFS2 . The current value of the compensation current I OFS1 /X is determined by the current value of the compensation current I OFS2 , for example. Here, X may be a predetermined parameter ratio based on the practical design requirement. The invention does not intend to impose a limitation in this regard. In this embodiment, when the switch  131  is not turned on, the switch  133  is turned on. At this time, the setting unit  120  generates a setting current I RT  based on the compensation current I OFS1 /X and a current flowing through the external setting impedor XR T , for example. 
     Thus, in this embodiment, the operation of the reference setting circuit  100  may be substantially divided into two stages. In the first stage, the switch  131  is turned on, and the switch  133  is not turned on. The comparator  110  compares the reference voltage V R  of the internal resistor R X  and the end voltage V c  of the reference resistor R IN , for example. Then, the comparator  110  may adjust the resistance value of the reference resistor R IN  or adjust the current value of the variable current to change the end voltage V c  based on the result of comparison. In the second stage, the switch  131  is not turned on, and the switch  133  is turned on. The setting unit  120  generates the setting current I RT  based on the compensation current I OFS1 /X and the current flowing through the external setting impedor XR T , for example. In this way, the parameter setting circuit  100  is capable of generating the setting current I RT  proportional to the voltage V IN  and the external setting impedor XR T  by being coupled to one single pin and the external setting impedor XR T . 
     In the following, different exemplary embodiments where the comparator adjusts the end voltage V c  of the reference resistor R IN  based on the comparison result and the comparator adjusts the current value of the variable current based on the comparison result are respectively described in detail. 
       FIG. 2  is a schematic circuit view illustrating a parameter setting circuit according to an embodiment of the invention.  FIG. 3  is a schematic waveform diagram illustrating a control signal of the parameter setting circuit in the embodiment of  FIG. 2  and the resistance value of a resistor thereof. Referring to  FIGS. 2 and 3 , a parameter setting circuit  200  of this embodiment changes the end voltage V c  by adjusting the resistance value of a variable resistor R IN , for example. In this embodiment, the parameter setting circuit  200  includes a switch unit  240 , an internal parameter adjustment unit  250 , and a setting unit  220 . In this embodiment, the setting reference unit may be the variable resistor R IN , for example, an external setting impedor A×R T  and the variable resistor R IN  form a resistor string. Here, A is a predetermined parameter ratio based on the practical design requirement. The invention does not intend to impose a limitation in this regard. In this embodiment, the predetermined parameter ratio A is a predetermined resistance ratio, for example. One end of the resistor string is coupled to the first voltage V IN , and the other end is coupled to a second voltage GND. The first resistor A×R X  and the second resistor R X  form a voltage dividing circuit  252  to provide the predetermined parameter ratio A. One end of the voltage dividing circuit  252  is coupled to the first voltage V IN , and the other end is coupled to the second voltage GND. 
     Specifically, in this embodiment, an end of the second resistor R X  coupled to the first resistor A×R X  is coupled to the comparator  210  through a first switch  231 _ 1 . The variable resistor R IN  is coupled to the external setting impedor A×R T  through a second switch  232 , and an end of the variable resistor R IN  coupled to the external setting impedor A×R T  is coupled to the comparator  210  through a first switch  231 _ 2 . In other words, the respective ends of the second resistor R X  and the variable resistor R IN  are respectively coupled to the comparator  210  through the first switch. The control signals UG and S 1  are respectively used to control turn-on/off states of the first switches  231 _ 1  and  231 _ 2  and the second switch  232 . The waveforms thereof are shown in  FIG. 3 . In this embodiment, the control signals UG and S 1  have the same phase, and simultaneously turn on/off the first switches  231 _ 1  and  231 _ 2  and the second switch  232 . Thus, when the parameter setting circuit  200  is operated at the first stage, i.e., when the first switches  231 _ 1  and  231 _ 2  and the second switch  232  are turned on, the comparator  210  compares the reference voltage V R  of the second resistor R X  and the end voltage V c  of the variable resistor R IN , and adjusts the resistance value of the variable resistor R IN  based on the comparison result, so as to change the end voltage V c . 
     In this embodiment, the control signals UG and S 1  respectively and periodically turn on/off the first switches  231 _ 1  and  231 _ 2  and the second switch  232 . Thus, the comparator  210  periodically and repetitively compares the reference voltage V R  of the second resistor R X  and the end voltage V c  of the variable resistor R IN , and adjusts the resistance value of the variable resistor R IN  based on the comparison result, so as to adjust the resistance value of the variable resistor R IN  to be in a predetermined proportional relation with the resistance value of the external setting impedor A×R T . For example, a ratio between the variable resistor R IN  and the external setting impedor A×R is the predetermined parameter ratio A. For example, the predetermined parameter ratios A of the first resistor A×R X  and the external setting impedor A×R T  are set to be equal. In addition, after the first stage is repetitively performed one or more times, the comparator  210  may adjust the resistance value of the variable resistor R IN , for example, so as to change the end voltage V c  to make the voltage values of two input ends of the comparator  210  equal. When such comparison result is established, the resistance value of the external setting impedor A×R T  and the resistance value of the variable resistor R IN  have the predetermined proportional relation. For example, the ratio therebetween is the predetermined parameter ratio A, i.e., 
                   A   ×     R   T         R   IN       =   A     ,         
and an equation of resistance values R IN =R T  is obtained, as shown in  FIG. 3 . R IN  is the resistance value of the variable resistor, A×R T  is the resistance value of the external setting impedor, and A is the predetermined parameter ratio.
 
     Also, in this embodiment, the setting unit  220  is coupled to the comparator  210  through third switches  233 _ 1  and  233 _ 2 , for example. The control signal S 2  is used to control turn-on/off states of the third switches  233 _ 1  and  233 _ 2 , and the signal waveform of the control signal S 2  is in an opposite phase of those of the control signals UG and S 1 . In other words, in this embodiment, when the first switches  231 _ 1  and  231 _ 2  and the second switch  232  are turned on, the third switches  233 _ 1  and  233 _ 2  are not turned on. On the contrary, when the first switches  231 _ 1  and  231 _ 2  and the second switch  232  are not turned on, the third switches  233 _ 1  and  233 _ 2  are turned on. In this embodiment, the control signal S 2  is obtained by inverting the control signals UG and S 1 . However, the invention does not intend to impose a limitation in this regard. In this embodiment, the control signal S 2  periodically and simultaneously turns on/off the third switches  233 _ 1  and  233 _ 2 , such that when the parameter setting circuit  200  is operated at the second stage, i.e., when the third switches  233 _ 1  and  233 _ 2  are turned on, the setting unit  220  generates a setting current I at least based on a compensation current I 2 /A. 
     More specifically, in this embodiment, the setting unit  220  includes a compensation current source  222 , a current mirror circuit  224 , and a buffer circuit  226 . A first end of the current mirror circuit  224  is coupled to the compensation current source  222  and the external setting impedor A×R T . The compensation current source  222  is configured to provide the compensation current I 2 /A to the current mirror circuit  224 . When the third switch  233 _ 1  is turned on, the external setting impedor A×R T  outputs a first current I 1  to the current mirror circuit  224 . For example, when the third switch  233 _ 1  is turned on, a current value of the first current I 1  is obtained by subtracting an end voltage Vth of the variable resistor R IN  from the first voltage V IN  and dividing the value after subtraction with the resistance value of the external setting impedor A×R T . Namely, the current value is 
                 I   ⁢           ⁢   1     =         V   IN     -     V   th         A   ×     R   T           ,         
wherein V IN  is the voltage value of the first voltage, Vth is the voltage value of the end voltage of the variable resistor R IN , and A×R T  is the resistance value of the external setting impedor. Then, the current mirror circuit  224  is configured to mirror the compensation current I 2 /A and the first current I 1  from a first end of the current mirror circuit  224  to a second end of the current mirror circuit  224 , so as to generate the setting current I. Here, A may be a predetermined parameter ratio based on the practical design requirement. However, the invention does not intend to impose a limitation in this regard.
 
     In this embodiment, the buffer circuit  226  is coupled to the current mirror circuit  224  and the variable resistor R IN . The buffer circuit  226  includes a compensation current source  221  and a buffer amplifier  223 . An output end of the buffer amplifier  223  is coupled to the compensation current source  221 , and two input ends of the buffer amplifier  223  are respectively coupled to the current mirror circuit  224  and the variable resistor R IN . When the third switch  233 _ 1  is turned on, the compensation current source  221  is configured to provide a second current I 2  to the variable resistor R IN . Thus, in this embodiment, the current value of the second current I 2  is determined based on the resistance value of the variable resistor R IN . Also, the current value of the compensation current I 2 /A is determined based on the current value of the second current I 2 . For example, when the third switch  233 _ 1  is turned on, the current value of the second current I 2  may be obtained by dividing the end voltage Vth of the variable resistor R IN  with the resistance value of the variable resistor R IN , for example. Namely, the current value I 2  is equal to Vth/R IN . Thus, the current value of the compensation current I 2 /A is 
                   I   ⁢           ⁢   2     A     =       V   IN       A   ×     R   IN           ,         
wherein I 2 /A is the current value of the compensation current, Vth is the voltage value of the end voltage of the variable resistor R IN , and R IN  is the resistance value of the variable resistor. Accordingly, the current mirror circuit  224  mirrors the compensation current I 2 /A and the first current I 1  from the first end of the current mirror circuit  224  to the second end of the current mirror circuit  224 , and the current value of the setting current I generated by the current mirror circuit  224  is a sum of the compensation current I 2 /A and the first current I 1 , namely the current value is
 
               I   =           V   IN     -     V   th         A   ×     R   T         +       V   th       A   ×     R   IN             ,         
wherein I is the current value of the setting current, V IN  is the voltage value of the first voltage, Vth is the voltage value of the end voltage of the variable resistor R IN , A×R T  is the resistance value of the external setting impedor, and R IN  is the resistance value of the variable resistor.
 
     Thus, in this embodiment, the first stage and the second stage of the parameter setting circuit  200  are performed alternately and performed one or more times repetitively and periodically. In the first stage, the comparator  210  adjusts the resistance value of the variable resistor R IN  to be in a predetermined proportional relation with the resistance value of the external setting impedor A×R T , such that an equation of resistance values R IN =R T  is established, as shown in  FIG. 3 . In the second stage, the setting current I generated by the setting unit  220  based on the compensation current I 2 /A and the first current I 1  has the current value 
               I   =           V   IN     -     V   th         A   ×     R   T         +       V   th       A   ×     R   IN             ,         
wherein I is the current value of the setting current, V IN  is the voltage value of the first voltage, Vth is the voltage value of the end voltage of the variable resistor R IN , A×R T  is the resistance value of the external setting impedor, and R IN  is the resistance value of the variable resistor. When the equation of resistance values R IN =R T  is satisfied, the current value is
 
             I   =         V   IN       A   ×     R   T         .           
Thus, in this embodiment, the parameter setting circuit  200  is capable of generating the setting current I proportional to the voltage V IN  and the external setting impedor A×R T  by being coupled to the external setting impedor A×R T  through one single pin  230 . Here, A may be a predetermined parameter ratio based on the practical design requirement. However, the invention does not intend to impose a limitation in this regard.
 
     In an embodiment, the parameter setting circuit  200  serves as a parameter setting circuit of a power conversion apparatus, for example. The internal parameter adjustment unit  250  has the predetermined parameter ratio A and a setting reference unit. In this embodiment, the predetermined parameter ratio A is implemented by using the reference voltage V R  provided by the voltage dividing circuit  252 . The setting reference unit may be the variable resistor R IN , and a first end of the variable resistor R IN  has the end voltage V c . The internal parameter adjustment unit  250  adjusts the setting reference unit (i.e., the variable resistor R IN ) based on the operation of the switch unit  240 , the external setting impedor A×R T , the first voltage V IN , and the predetermined parameter ratio A. For example, the comparator  210  of the internal parameter adjustment unit  250  is configured to compare the reference voltage V R  and the end voltage V c , output the comparison result, and adjust the variable resistor R IN  based on the comparison result. In this embodiment, the setting unit  220  is configured to provide the setting parameter to the power conversion apparatus based on the adjusted setting reference unit (i.e., the variable resistor R IN ). The setting parameter includes the setting current, for example. 
       FIG. 4  is a flowchart illustrating a method for generating a current according to an embodiment of the invention. Referring to  FIGS. 2 to 4 , the method for generating a current of this embodiment is at least adapted for the parameter setting circuit  200  shown in  FIG. 2 . In this embodiment, at Step S 400 , the comparator  210  periodically compares the end voltages of the variable resistor R IN  and the second resistor R X , namely the end voltage V c  and the reference voltage V R  based on the control signal UG. Then, at Step S 410 , the comparator  210  periodically adjusts the resistance value of the variable resistor R IN  based on the control signal UG, such that the resistance values of the variable resistor R IN  and the external setting impedor A×R T  have the predetermined proportional relation. For example, the ratio between the variable resistor R IN  and the external setting impedor A×R T  is equal to the predetermined parameter ratio A, such that the equation of resistances R IN =R T  is established. Afterwards, at Step S 420 , the setting unit  220  generates the setting current I based on the compensation current I 2 /A and the first current I 1 , and the current value of the current I is 
             I   =         V   IN       A   ×     R   T         .           
Thus, in this embodiment, the setting current I proportional to the first voltage V IN  and the external setting impedor A×R T  is generated by using the parameter setting circuit  200  coupled to the external setting impedor A×R T  through the single pin  230  in the method for generating a current. Here, A may be a predetermined parameter ratio based on the practical design requirement. However, the invention does not intend to impose a limitation in this regard.
 
     Also, sufficient teaching, suggestions, and descriptions for embodiment of the method for generating a current according to an embodiment of the invention can be obtained from the embodiments shown in  FIGS. 2 and 3 . Thus, repeated details will not be described in the following. 
       FIG. 5  is a schematic circuit view illustrating a parameter setting circuit according to another embodiment of the invention.  FIG. 6  is a schematic waveform diagram illustrating a control signal of the parameter setting circuit and an end voltage of an input end of a comparator in the embodiment of  FIG. 5 . Referring to  FIGS. 5 and 6 , a parameter setting circuit  300  of this embodiment generates an output current by adjusting a variable current. In this embodiment, the parameter setting circuit  300  includes a switch unit  360 , an internal parameter adjustment unit  350 , and a setting unit  320 . In this embodiment, the external setting impedor A×R T  and a fixed resistor R IN  form a resistor string, and one end of the resistor string is coupled to the first voltage V IN , while the other end of the resistor string is coupled to the second voltage GND. One end of a first resistor (A−1)×R X  is coupled to the second resistor R X  to form a voltage dividing circuit  352 . One end of the voltage dividing circuit  352  is coupled to the first voltage V IN , and the other end of the voltage dividing circuit  352  is coupled to the second voltage GND. After voltage division, the voltage value at one end of the second resistor R X  is a reference voltage V IN /A. Also, in this embodiment, the internal parameter adjustment unit  350  includes a setting reference unit  356  and a first current generating circuit  354 . The setting reference unit  356  includes a comparator  310 , a second current generating circuit  340 , and a reference resistor R C . One end of the second current generating circuit  340  is coupled to the reference resistor R C . The second current generating circuit  230  provides a variable current (1+a)I 3  to the reference resistor R C , so as to generate the end voltage V c  at one end of the reference resistor R C . Preferably, the value of the reference resistor R C  is equal to the value of the second resistor R X . 
     Specifically, in this embodiment, one end of the second resistor R X  coupled to the first resistor (A−1) R X  is coupled to the comparator  310  through a first switch  331  and provides the reference voltage V IN /A. The reference resistor R C  is coupled to the comparator  310 . The fixed resistor R IN  is coupled to the external setting impedor A×R T  through the second switch  332 . The control signals UG and S 1  are respectively used to control turn-on/off states the first switch  331  and the second switch  332 . The waveforms thereof are shown in  FIG. 6 . In this embodiment, the control signals UG and S 1  have the same phase, and simultaneously turn on/off the first switch  331  and the second switch  332 . Thus, when the parameter setting circuit  300  is operated at the first stage, i.e., when the first switch  331  and the second switch  332  are turned on, the comparator  310  compares the reference voltage V IN /A of the second resistor R X  and the end voltage V c  of the reference resistor R C . Here, A may be a predetermined parameter ratio based on the practical design requirement. However, the invention does not intend to impose a limitation in this regard. Then, the comparator  310  adjusts the current value of the variable current (1+a)I 3 , such as adjusting a setting parameter a, based on a comparison result, so as to change the end voltage V c  of the reference resistor R C . In this embodiment, the control signals UG and S 1  respectively and periodically turn on/off the first switch  331  and the second switch  332 . Thus, the comparator  310  periodically and repetitively compares the reference voltage V IN /A of the second resistor R X  and the end voltage V c  of the reference resistor R C  and adjusts the current value of the variable current (1+a)I 3  based on the comparison result, such that the reference voltage V IN /A of the second resistor R X  and the end voltage V c  of the reference resistor R C  are substantially equal to each other. The signal waveforms thereof are shown in  FIG. 6 . 
     In this embodiment, the first current generating circuit  354  includes a current source  351 , a buffer amplifier  353 , and a fourth resistor A×R X . The current source  351  is configured to provide the first current I 3  to the fourth resistor A×R X . An output end of the buffer amplifier  353  is coupled to the current source  351 , and two input ends of the buffer amplifier  323  are respectively coupled to the fourth resistor A×R X  and the fixed resistor R IN . When the second switch  332  is turned on, end voltages of the two input ends of the buffer amplifier  323  are equal to each other and substantially equal to an end voltage of one end that the external setting impedor A×R T  is coupled to the fixed resistor R IN . Thus, the current value of the first current I 3  flowing through the fourth resistor A×R X  is determined based on the resistance value of the fourth resistor A×R X  and an end voltage of one end that the fourth resistor A×R X  is coupled to an inverted input end of the buffer amplifier  323 . After the current value of the first current I 3  is determined, the current value of the variable current (1+a)I 3  may also be determined based on the current value of the first current I 3 , so as to determine the end voltage V c  of the reference resistor R C . Thus, after the first stage is repetitively performed one or more times, the comparator  310  may adjust the current value of the variable current (1+a)I 3  to make voltage values of two input ends of the comparator  310  equal. Namely, the reference voltage V IN /A of the second resistor R X  and the end voltage V c  of the reference resistor R C  are equal, as shown in  FIG. 6 . When such comparison result is established, the resistance value of the fixed resistor R IN  and the resistance value of the external setting impedor A×R T  have a predetermined proportional relation. For example, a ratio between the resistance value of the fixed resistor R IN  and the resistance value of the external setting impedor A×R T  is 1/a, namely 
                 R   IN       A   ×     R   T         =       1   a     .           
Thus, an equation of resistance values a×R IN =A×R T  may be established, wherein RIN is the resistance value of the fixed resistor, and A×R T  is the resistance value of the external setting impedor.
 
     In this embodiment, the end voltages of the two input ends of the amplifier buffer  323  are equal, and are substantially equal to the end voltage of the end that the fixed resistor R IN  is coupled to the external setting impedor A×R T . The current value of the first current I 3  is determined based on the resistance value of the fourth resistor A×R X  and the end voltage of the end that the fourth resistor A×R X  is coupled to the inverted input end of the buffer amplifier  323 . In addition, the current value of the variable current (1+a)I 3  is determined based on the current value of the first current I 3 , so as to determine the end voltage V c  of the reference resistor R C . 
     Also, in this embodiment, the setting unit  320  is coupled to the comparator  310  through third switches  333 _ 1  and  333 _ 2 , for example. The control signal S 2  is used to control turn-on/off states of the third switches  333 _ 1  and  333 _ 2 , and the signal waveform of the control signal S 2  is in an opposite phase of those of the control signals UG and S 1 . In other words, in this embodiment, when the first switches  331 _ 1  and  331 _ 2  and the second switch  332  are turned on, the third switches  333 _ 1  and  333 _ 2  are not turned on. On the contrary, when the first switches  331 _ 1  and  331 _ 2  and the second switch  332  are not turned on, the third switches  333 _ 1  and  333 _ 2  are turned on. In this embodiment, the control signal S 2  is obtained by inverting the control signals UG and S 1 . However, the invention does not intend to impose a limitation in this regard. In this embodiment, the control signal S 2  periodically and simultaneously turns on/off the third switches  333 _ 1  and  333 _ 2 , such that when the parameter setting circuit  300  is operated at the second stage, i.e., when the third switches  333 _ 1  and  333 _ 2  are turned on, the setting unit  320  generates the setting current I at least based on a compensation current I 2 /a. 
     More specifically, in this embodiment, the setting unit  320  includes a compensation current source  322 , a current mirror circuit  324 , and a buffer circuit  326 . A first end of the current mirror circuit  324  is coupled to the compensation current source  322  and the external setting impedor A×R T . The compensation current source  322  is configured to provide the compensation current I 2 /a to the current mirror circuit  324 . In this embodiment, the comparator  310  adjusts the current value of the variable current (1+a)I 3 , such as adjusting a parameter value a, based on the comparison result. Thus, the current value of the compensation current I 2 /a is changed based on the current value of the variable current (1+a)I 3 . When the third switch  333 _ 1  is turned on, the external setting impedor A×R T  outputs the third current I 1  to the current mirror circuit  324 . For example, when the third switch  333 _ 1  is turned on, the current value of the third current I 1  is obtained by subtracting the end voltage Vth of R IN  from the first voltage V IN  and dividing the value after subtraction with the resistance value of the external setting impedor A×R T . Namely, the current value is 
                 I   ⁢           ⁢   1     =         V   IN     -     V   th         A   ×     R   T           ,         
wherein V IN  is the voltage value of the first voltage, Vth is the voltage value of the end voltage of the reference resistor R IN , and A×R T  is the resistance value of the external setting impedor. A may be a predetermined parameter ratio based on the practical design requirement, and the invention does not intend to impose a limitation in this regard. Then, the current mirror circuit  324  is configured to mirror the compensation current I 2 /a and the third current I 1  from a first end of the current mirror circuit  324  to a second end of the current mirror circuit  324 , so as to generate the setting current I.
 
     In this embodiment, the buffer circuit  326  is coupled to the current mirror circuit  324  and the fixed resistor R IN . The buffer circuit  326  includes a compensation current source  321  and a buffer amplifier  323 . An output end of the buffer amplifier  323  is coupled to the compensation current source  321 , and the two input ends of the buffer amplifier  323  are respectively coupled to the current mirror circuit  324  and the variable resistor R IN . When the third switch  333 _ 2  is turned on, the compensation current source  321  is configured to provide the second current I 2  to the fixed resistor R IN . Thus, in this embodiment, the current value of the second current I 2  is determined based on the resistance value of the fixed resistor R IN . Also, the current value of the compensation current I 2 /a is determined based on the current value of the second current I 2 . For example, when the third switch  333 _ 2  is turned on, the current value of the second current I 2  may be obtained by dividing the end voltage Vth of the reference resistor R IN  of a transistor Q with the resistance value of the fixed resistor R IN , for example. Namely, the current value I 2  is equal to Vth/R IN . Thus, the current value of the compensation current I 2 /a is 
                   I   ⁢           ⁢   2     a     =       V   th       a   ×     R   IN           ,         
wherein I 2 /a is the current value of the compensation current, Vth is the voltage value of the end voltage of the reference resistor R IN , and R IN  is the resistance value of the fixed resistor. Accordingly, the current mirror circuit  324  mirrors the compensation current I 2 /a and the third current I 1  from the first end of the current mirror circuit  324  to the second end of the current mirror circuit  324 , and the current value of the setting current I generated by the current mirror circuit  324  is a sum of the compensation current I 2 /a and the third current I 1 , namely the current value is
 
               I   =           V   IN     -     V   th         A   ×     R   T         +       V   th       a   ×     R   IN             ,         
wherein I is the current value of the setting current, V IN  is the voltage value of the first voltage, Vth is the voltage value of the end voltage of the reference resistor R IN , A×R T  is the resistance value of the external setting impedor, and R IN  is the resistance value of the fixed resistor.
 
     Thus, in this embodiment, the first stage and the second stage of the parameter setting circuit  300  are performed alternately and performed one or more times repetitively and periodically. In the first stage, the comparator  310  adjusts the current value of the variable current (1+a)I 3  based on the comparison result, such that the reference voltage V IN /A of the second resistor R X  and the end voltage V c  of the reference resistor R C  are substantially equal. The waveforms thereof are as shown in  FIG. 6 . In this way, the equation of resistance values a×R IN =A×R T  is established. In the second stage, the setting unit  320  generates the setting current I based on the compensation current I 2 /a and the third current I 1 , and the current value of the current I is 
             I   =           V   IN     -     V   th         A   ×     R   T         +         V   th       a   ×     R   IN         .             
When the equation of resistance values a×R IN  A×R T  is established, the current value is
 
             I   =         V   IN       A   ×     R   T         .           
Thus, in this embodiment, the parameter setting circuit  300  is capable of generating the setting current I proportional to the first voltage V IN  and the external setting impedor A×R T  by being coupled to the external setting impedor A×R T  through one single pin  330 . Here, A may be a predetermined parameter ratio based on the practical design requirement. However, the invention does not intend to impose a limitation in this regard.
 
     In an embodiment, the parameter setting circuit  300  serves as a parameter setting circuit of a power conversion apparatus, for example. The internal parameter adjustment unit  350  has the predetermined parameter ratio A and a setting reference unit  354 . In this embodiment, the predetermined parameter ratio A is implemented by using the reference voltage V R  provided by the voltage dividing circuit  352 . The setting reference unit  354  includes a second current generating circuit  340  that provides a variable current. The internal parameter adjustment unit  350  adjusts the setting reference unit  354  (i.e., adjusting the variable current) based on the operation of the switch unit  340 , the external setting impedor A×R T , the first voltage V IN , and the predetermined parameter ratio A. For example, the comparator  310  of the internal parameter adjustment unit  350  is configured to compare the reference voltage V IN /A and the end voltage V c , output the comparison result, and adjust the variable current based on the comparison result. In this embodiment, the setting unit  320  is configured as a setting unit providing the setting parameter to the power conversion apparatus based on the adjusted setting reference unit  354  (i.e., the variable current). The setting parameter includes the setting current, for example. 
       FIG. 7  is a flowchart illustrating a method for generating a current according to another embodiment of the invention. Retelling to  FIGS. 5 to 7 , the method for generating a current of this embodiment is at least adapted for the parameter setting circuit  300  shown in  FIG. 5 . In this embodiment, at Step S 700 , the comparator  310  periodically compares the end voltages of the second resistor R X  and the reference resistor R C , namely the reference voltage V IN /A and the end voltage V c  based on the control signal UG. Then, at Step S 710 , the comparator  310  periodically adjusts the current value of the variable current (1+a)I 3  based on the control signal UG, such that the reference voltage V IN /A of the second resistor R X  and the end voltage V c  of the reference resistor R C  are substantially equal. In this way, the equation of resistance values a×R IN =A×R T  is established. Afterwards, at Step S 720 , the setting unit  320  generates the setting current I based on the compensation current I 2 /a and the third current I 1 , and the current value of the current I is 
             I   =         V   IN       A   ×     R   T         .           
Thus, in this embodiment, the setting current I proportional to the voltage V IN  and the external setting impedor A×R T  is generated by using the parameter setting circuit  300  coupled to the external setting impedor A×R T  through the single pin  330  in the method for generating a current. Here, A may be a predetermined parameter ratio based on the practical design requirement. However, the invention does not intend to impose a limitation in this regard.
 
     Also, sufficient teaching, suggestions, and descriptions for embodiment of the method for generating a current according to an embodiment of the invention can be obtained from the embodiments shown in  FIGS. 5 and 6 . Thus, repeated details will not be described in the following. 
       FIG. 8  is a flowchart illustrating a method for generating a current according to another embodiment of the invention. Referring to  FIGS. 1A, 1B, 2, 5, and 8 , the method for generating a current of this embodiment is at least adapted for the parameter setting circuit  400  shown in  FIG. 1A , the parameter setting circuit  100  shown in  FIG. 1B , the parameter setting circuit  200  shown in  FIG. 2 , and the parameter setting circuit  300  shown in  FIG. 5 . In this embodiment, at Step S 800 , a reference voltage and an end voltage of an end of a reference resistor are compared to obtain a comparison result. Then, at Step S 810 , the end voltage is adjusted based on the comparison result. At Step S 820 , a setting parameter is obtained based on the adjusted end voltage. Then, at Step S 830 , a setting current is generated based on a compensation current. The compensation current is generated based on a first current and the setting parameter. 
     Also, sufficient teaching, suggestions, and descriptions for embodiment of the method for generating a current according to an embodiment of the invention can be obtained from the embodiments shown in  FIGS. 1A to 7 . Thus, repeated details will not be described in the following. 
     In view of the foregoing, in the exemplary embodiment of the invention, the parameter setting circuit is coupled to the external voltage and the external setting impedor through the single pin. In the method for generating a current, the resistance value of the internal resistor is adjusted or the current value of the variable current is adjusted based on the comparison result of the end voltages of two internal resistors, so as to generate the setting current accurately proportional to the external voltage and the external setting impedor. 
     It will be apparent to those skilled in the art that various modifications and variations can be made to the structure of the present invention without departing from the scope or spirit of the invention. In view of the foregoing, it is intended that the present invention cover modifications and variations of this invention provided they fall within the scope of the following claims and their equivalents.