摘要 |
A power supply includes a direct current (DC) voltage converter, a display, a voltage output interface, and a main controller. The DC voltage converter is connected to a voltage terminal of a peripheral interface. The display displays an input interface to allow a voltage value to be inputted therein. The main controller includes a voltage obtaining module and a control module. The voltage obtaining module is used to obtain the inputted voltage value, and output the inputted voltage value. The control module is used to output a pulse width modulation (PWM) signal to the DC voltage converter according to a proportion relationship between the inputted voltage value and the value of a predetermined voltage value. The DC voltage converter is used to convert the first voltage into a second voltage according to the PWM signal, and outputs the second voltage through the voltage output interface. |