Every millisecond, I poll _IC3IF to see if there were new pulses, and reset the flag if there were. But I don't read the amount until there were no more pulses for a whole millisecond. Then, I read IC3BUF. Reading it does also clear it, right?

I'm expecting to see ~160 pulses per 1ms up until ~1200 pulses cumulated. Then nothing until the next series of pulses starts. But I keep seeing a random number of pulses in IC3BUF in the debugger.Of cause I had a look at the oscilloscope. Everything hardware-related seems in very good condition.

Now my question: How would I set up an interrupt capture to count pulses? Or do I evaluate them wrong?

MBedder: Does that mean that input capture cannot count pulses?Going back to the data sheet, I indeed must confess that I misread Input Capture as being configurable as timer/counter. That is not mentioned there.

So I will have to either use the Quadrature Encoder Interface or Timer2 (which is already in use). I guess it's easier to derive my internal times from another timer than to get QEI up and running. Correct?

@MBedder Why so agitated? OK, I'm shocked, too, that I didn't mention the dsPIC in question but let's calm down and have a chat.I'm using a dsPIC33EP256GP502. The data sheet states on page 1 that there are four possibilities to count1) Timer2) Output Compare3) Peripheral Trigger Generator4) Quadrature Encoder Interface

Page 177 states that the inputs for QEI are on Motor Control devices only, not on General Purpose, which we have here. So 4) is inapplicable.For 3) I'm too stupid to get how to configure that thing.2) doesn't have any inputs except for a Fault signal. Don't know how to count with that. Maybe if combined with an Interrupt Capture module. But I think it's way easier to use1) Timer1, Timer3, Timer4 and Timer5 all have fixed clock inputs, which are not the one I need to count on.That leaves Timer2 with its remappable clock input to use.

Maybe 2) or 3) could also work with more configuration effort. Thank you for pointing me there.For now, I'm happy with Timer2 counting input pulses.

I found the external clock inputs for those timers. And I found that with the exception of Timer2, all of them are fixed. And I'm happy that Timer2 allows to use the one pin I need to count pulses on.

In the light of this whole thing working perfectly since Post#5, I want to state that we're no longer searching for a solution. Even less do I ty to let others do my work.My question how to relocate Timer1's input, which I think is what triggered you, was a rhethorical one for MBedder, who seemed to think that Timer1's input is not fixed to some pin. And since his post lacked the usual friendliness that we're all used to in this forum, I really would have liked to see what I had said or done wrong while it is so easy to get right.