One aspect is directed to a computer including a battery, a battery charging circuit operatively connected to the battery to charge the battery at a charging rate, and a temperature detection and control circuit, coupled to the battery charging circuit, that detects a temperature within the computer and provides a control signal to the battery charging circuit having a control value based on the t