capture with 16F1829

Thread Starter

Nik@

Joined Apr 1, 2021
21
Hi all
I hope you all keeping well. I am trying to count a frequency with capture module. I enclose all relevant files with comments. The issue i have is that when the program runs ignores the capture module and stucking in the main's while loop waiting for the EndCapture flag to set. I assume that the code is good and think something wrong with the CCP setup. If someone can take a look and advice i will appreciate. I have done the same project with timers and went very well now i am trying to experiment with the capture module. I use mplab and xc8 last version compiler. The input signal which i am testing the code is coming from stimulus with 25ms high and 25ms low signal wich runs ok according to the polling through also stimulus. My clock is internal @4MHz so the period of the testing signal is 50ms. By mistake in the title the pic is 16F1829

Regards
Nik
 

Attachments

Top