I want to measure the p.d. of the motor when it operate, the motor has two input A and B. Both of them can be 0 or positive. If I connect either of them to ground,and other to an input pin, the input might be grounded. What is the easy circuit to measure the p.d. with signs?