I'm doing something similar to maintain the flooded-cell deep-cycle lead-acid battery in my RV (travel trailer). I have a modern switch-mode 120Vac 35A power supply/charger which has screw terminals to select two different preset charging voltages: 13.2V for float, and 14.25V for charging. When I bought the trailer, the screw terminals were open, meaning that the battery only got the float voltage. I made a circuit that automatically recharges the battery at the 14.2V level (by shorting the screw terminals) until the charging current drops to under 1A, and then automatically reverts to the float voltage (by opening the connection between the terminals).
The circuit is basically a flip-flop which gets set if the charging current is >3A, and the flip-flop gets cleared as the charging current drops below ~1A as the battery reaches full charge. The output of the flip-flop switches the power supply between its two preset voltages.
Imagine the following use model: Battery is fully charged to begin with. Trailer is used for a weekend in the mountains. Battery powers lights, water pump, radio, etc, so when I return home, and plug the trailer into the AC line, the power supply is trying to put out 13.2V, but the supply actually goes into its 30A current-limited mode, where the battery holds down the system voltage as the battery accumulates charge.
The initial high charging current sets my flip-flop, the supply stays in the constant-current mode until the battery voltage rises to 14.25V, at which point the supply automatically goes into constant-voltage mode, holding the voltage constant at 14.25V, while the charging current begins decreasing.
My circuit is watching the decreasing charging current, and when the charging current drops below ~1A, the flip-flop clears, causing the power supply to switch to its other preset level of 13.2V, which is appropriate for floating the battery 24/7. I leave the trailer plugged in while it is parked at home.
I use a ZXCT1009 high-side current monitor to sense the charging current. Its output sets/clears the flip-flop, which is basically an op-amp used a comparator (with a lot of positive feedback (hysteresis). You could implement the current sensing the same way I did, but use your PIC and its ADC as the "flip-flop". I'll post the schematic if you want it...