What are you using to measure the current? Resistor, hall effect device or what....
The hall effect current transformers are very acurate and can be read directly by a PIC's analog inputs.
If your battery voltage is greater than 5 volt, you will need to use a couple of resistors to divide this voltage, as the PIC can only read 0 to 5 volts.
So basicaly, read the voltage.
Read the current.
And and wait for the correct voltage/current condition, then stop the charging.
If you wish, you could also add an LCD and display the charging condition and status.
I am working on building one now. Use op amp to condition the voltage input from the battery into a range for the adc converter on the pic. I use a differential amp with a gain of 1/4.
On the low side of the battery insert a sense resistor, say 1 ohm for currents up to 1 amp. I use an amp with a gain of say 4 feed it to another adc on the pic.