App note: Get a constant +5V output by switching between a +5V input and a single-cell LI+ rechargeable cell
App note from Maxim Integrated on providing smooth power from two sources. Link here (PDF)
Design provides a simple method for maintaining an uninterrupted +5V even while switching between the external +5V supply and a rechargeable single-cell Li+ battery.
Read more Here