How to Charge Lithium Ion Batteries?

Are there any references on how to charge lithium ion arrays of cells? I have an EV book and it mentions in order to efficiently charge these batteries, a micro controller needs to keep tabs on the temperature, and the voltage of each array (parallel-series). Are there any examples of charging code for ATMEL MC’s?

First, you should never charge a battery rated at 3.7V with 5V. You need to drop down the voltage first. Second, Li-Ion batteries are very hard to charge. They require power electronics that monitor the current, temp, voltage, etc to keep the battery from being damaged. Just using a resistor will reduce the life of the battery at best and cause it to explode at worst.