hello,
frequecy fed to the circuit is ac mains with 50Hz.
do you mean, RC2 input is connected to an AC 50Hz sinusoidal voltage ?
be carreful ,risk of burning out for this input..
and dangerous for your life if no insulation !
you better have to build a litle TTL oscillator with a NE555 or
with a CD4060+Quartz (
**broken link removed**)
for testing...
with CCP1 mode, timer1 counts the elapsed cycles between edges on RC2 input..
i did some comparative tests with a 16F877 mikroC
range 4.882629 Hz up to 3125 Hz
**broken link removed**
and
18F26K22_Freq_CCP_Timer1_Timer3_130925.c
you can have a look on it to get inspiration..
read in detail, the PIC16F datasheet and CCPx part to understand how it's working.
after choose the best strategie to get the best accuracy to your own range 1hZ ..100Hz
What is your FOsc ..(Quartz value ?)