In a preferred embodiment, a battery charging system in the form of an
integrated circuit (IC), incorporated in a consumer electronic device,
has a charging controller, a charging current generator, a junction
temperature sensor, and a device current monitor. The junction
temperature sensor provides to the charging controller a measured
junction temperature of the IC. The charging current generator utilizes
fractional synthesis, which involves regulating the duty cycles of
multiple current sources, to achieve increased current resolution. The
charging controller regulates the charging current provided by the
charging current generator based on the relation of the measured junction
temperature to three or more threshold temperatures. The device current
monitor provides to the charging controller information about the current
utilization of the consumer electronic device, thus allowing the charging
controller to determine the device non-charging current and give priority
for available current to user applications running on the consumer
electronic device.