Introduction - If you have any usage issues, please Google them yourself
Using MSP430F149 internal comparator, comparing the external input signal is a square wave, comparing the threshold is 0.5* VCC, two input ports can also be compared to the signal.