Single chip microcomputer realizes lithium battery charging