Thanks Richard

I'm going to explain myself better.

My goal is to use timer0 to refresh the 7 segment displays, and use timer1 free running so i can count the pulses from portb.7 so i think setting interrupts for timer1 won't be nedded. The part that captures TMR1L and calculates RPM, is the one that is giving me problems.

Can you explain me better the part of tho orphaned code?

From what i have read, and correct me if i'm wrong, since i'm trying to aquire a signal near 0.625hz, those command won't serve my purposes.

There is one thing that i'm going to try is to use a 32.768 Khz crystal, my doubt is can i use as a primary crystal or do i have to connect it to RB6 and RB7?

Because i'm running out os pins, i'm setting on another breadboard the same schematic, but with a 16f877a.

Thanks.