Digitally controlled voltage source based on single chip microcomputer