I am wanting to make a smart charger for my 12v NiMH aircraft battery with a 2000mah compacitance. I have a ATMEGA328Pchip that i plan to use to monitor the voltage and cut it when it needs to. I plan to fast charge the battery until the ATmega reads 85% maximum voltage of the battery, and then it will become a trickle-down chargeruntil it reaches the full 12 volts. i plan to have it turn on an RGB led to signal charging and full charge as well. What I dont understand is how o configure the chip to be able to read the coltage of the battery without frying the chip. any ideas??