You would probably get better results if you enable 1 capture at a time, stop timer1 before clearing it & entering CaptureLoop2.
Are you trying to measure the period or high-going pulse width?
You would probably get better results if you enable 1 capture at a time, stop timer1 before clearing it & entering CaptureLoop2.
Are you trying to measure the period or high-going pulse width?
Hi thanks for your reply
I am measuring the period of the incoming pulses.
I have to say I had not considered enabling one CCP at a time. Would I acheive this changing the CCPxCON statement? (x being 1 or 2). Such as CCP1CON = %00000000.
Thanks.
Yes. Enable 1. Wait for capture. Disable 1, Enable 2, wait for capture, etc. It's a good idea to stop Timer1 before clearing it also.Would I acheive this changing the CCPxCON statement?
Many thanks Bruce for your advice.
I have done as you have suggested, including stopping Timer1 (T1CON = 0) before clearing, and all appears to be operating as it should. I am a happy chappie.....
Once again many thanks. Sorted.....
Chris.![]()
Bookmarks