Sorry, I copied the code from a project that used the timer 1 oscillator.
Change the top line to be as shown above.
I had noticed that the first time itself ... and I had made the corrections as above.. but it is still not working.. the CCP1F flag is not setting 'HIGH' when the comparison occurs. (i chkd this on the simulr) Please help..
Thanks