The two pins tied together (and the resistor) serve two purposes.
1. You're right Henrik, since Timer0 on 16F's can't be stopped and started like all the other timers, it's used to gate the incoming signal.
2. You can't directly read the value in Timer0's prescaler. So after counting pulses for the 1 sec. window, you have to provide additional pulses to the input until the value in TMR0 changes. The number of pulses you add tells you how many counts were already in the prescaler. This gives the low Byte of the final 32-bit value.
The result is made up of the Timer0 overflows (HighWord), the TMR0 value (HighByte of the LowWord) and the prescaler value (LowByte of the LowWord)




Bookmarks