A controller for a battery charger that includes a power converter has parametric sensors for providing a sensed Vin signal, a sensed Vout signal and a sensed Iout signal. A battery current regulator (BCR) is coupled to receive the sensed Iout signal and an Iout reference, and outputs a first duty cycle control signal. An input voltage regulator (IVR) receives the sensed Vin signal and a Vin reference. The IVR provides a second duty cycle control signal. A processor receives the sensed Iout signal and utilizes a Maximum Power Point Tracking (MPPT) algorithm, and provides the Vin reference to the IVR. A selection block forwards one of the first and second duty cycle control signals as a duty cycle control signal to the power converter. Dynamic switching between the first and second duty cycle control signals maximizes the power delivered to the battery