Hi,
I'd sugest you set up the TMR1 module as an asychcronous counter and feed your pulses to Pin2. The timer module will then count the pulses for you and you can read/reset/preset the count any time you like. The timer will keep on counting no matter what the rest of program is doing. Have a look at section 6 in the datasheet.
/Henrik Olsson.
Bookmarks