Anyone have sample code in basic to measure frequency through TMR1?

Any help will appreciated

Thanks