Reading signal frequency

comsat:
thank you for the reply.....i try the code suggest by bubulindo and it seems the output still the same. The weird is when i try unconnected the signal input from pin 8, there is still output and the value is 49-50

Then you should make sure pin 8 is the right one to use.