No one is going to help you if you don't try to help yourself. You need to define your specifications, what is your charging voltage, current? What are the specifications on the batteries you intend to charge?
You can learn more about batteries at http://batteryuniversity.com . You will need a power supply. You will most likely want to use a switching power supply for efficiency. Search for designs that suit your needs. You will need two voltages. One for your charging voltage but the other for to power your mcu.
Texas Instruments has a lot of easy to use switching power supply chips. One is the LM2675 http://www.ti.com/product/lm2675 which comes in various form factors including DIP. You can use this to power your mcu. They also have a variable version that you can use for your charging voltage.
Why do you want to make one when you can buy one? Charging batteries efficiently is not a trivial project and asking the question the way you asked it tells me a project like this is currently beyond your ability.