General Tips for Troubleshooting Input Capture and Example Code
General tips for troubleshooting input capture are not working on PIC® MCUs:
- Use a spare I/O pin and toggle it high/low in the input capture interrupt service routine (ISR). View this pin signal alongside the input square wave going into the input capture pin, and you will see how the interrupts occur relative to the input signal.
- Create an array and store the ICxBUF (input capture buffer) values into the array to record the values when you capture a number of values in a row.