Capacitance and inductance measurement method based on single chip microcomputer