I work with a lot of different types of rechargeable Li-Ion batteries in my work. My current project uses an internal 2200mA/Hour rechargeable cell. I would just like to clear up a few misconceptions.
First of call, all rechargeable Li-Ion batteries are manufactured with a protection circuit built in. This circuit does things like protect against over voltage situations, keeps the battery from discharging too much (which is not a good thing), makes sure you don’t draw too much current or charge with too much current (usually 0.7C), etc.
The protection circuit is designed for the specific application of the battery.
Also, here’s the reason why Li-Ion batteries are so dangerous. Li-Ion batteries have a similar chemistry to other types of batteries. The main difference is that the “electrolyte” substance which is used in the batteries is flammable.
If something goes wrong and the batteries build up too much pressure inside, they will “vent” through a special vent hole located someplace on the battery. The bad news is that when they do this, the electrolyte can ignite and when it does, it burns so fast that it explodes.
This is not good so needless to say, even though there is a venting mechanism on the battery, it’s not really desirable for the battery to vent. Especially when the it’s in a cell phone located about half and inch from your ear.
Recently, a good number of counterfeit Li-Ion batteries were used in cell phones, mostly in Asia. And yes, some of them did explode.
Again, not a good thing.
When designing with rechargeable Li-Ion batteries always follow the manufacturers design guide lines. Panasonic has some excellent documentation on their web site.
Okay, I hope that was informative.
PS: By the way, I am in a different market and I use C/C++ and RTOS mostly. Assembly wouldn’t work in our products. It would just take too long to write and make changes.