How to detect square wave using GPIO port of PIC12f675?
To detect the waveform you need to use the feedback copy of the square wave to enable a timer channel to count. The timer channel would need to be setup to clock on some internal frequency that is properly selected to give a reasonable number of counts per square wave but not so many that the counter overflows. Most MCU timer channels have a selectable pre-scaler that can be used to get the clocking into the correct range. 

There are several styles of timer mechanisms that can be used based upon the type of MCU in use. 

One style uses the input square wave as an enable gate to the timer so it can count while the gate is open. When the gate closes the software checks if number of counts in the counter matches with expected gate pulse width. This scheme is generally used to capture the count for a half cycle of the input square wave. 

The other style has the timer free running all the time. Then the edge of the square wave signal is used (often referred to as an Input Capture) to latch the current count of the free running timer into a holding register. Software saves away the capture register value just after the capture time. The software then gets ready for the next capture event. This may consist of enabling the input capture to operate on the opposite edge of the input square wave signal. After the next capture the software subtracts the two capture values to deduce how many time ticks happened between the input edges. If the input edge is toggled each time then you are measuring alternately the high period of the input waveform and then the low period. If the same edge is used each capture then you are measuring the period of the square wave.