Finally have success.
I changed the batt select to Port-A pin2 since that was already configured as an input. Not sure why portB gave so much trouble but did see that it had USART & SSP on that port. Anyway tried portA with a hardware pull-up resistor and a switch to ground, that worked. Then it was a little bit of playing around to get the internal weak pull-up working. The unused pins are set as outputs at (0).
Now it still works with the original board. If left as is it is set for lithium packs. To set up for SLA simply requires a short jumper from portA pin2 to a nearby unused pin that is at (0), or longer jumper to the main ground. Will be testing in one of the units soon.
Also came up with the idea of adjusting the values in the voltage divider to be able to measure the peak battery voltage. That way it could detect the battery type and change the levels to suit.....
I think I will shelve that idea some where up the back.
trying to get too smart with the software could get into all sorts of trouble.
Thanks to everyone for their feedback and help. I think I owe you guys a beer if you make it to Oz
Now I can get back to learning 'C' for the FreeEMS project.