Parallel/serial switching of connection of batteries to charge or load circuit