Langton
Joined: 29 Nov 2009 Posts: 26
|
| Clearing CCP timer |
Posted: Tue Dec 30, 2025 5:38 pm |
|
|
Hi Guys and Gals,
Got an issue that is doing my head in.
Using XIDE 6.00 with PCD1.22 on a dsPIC33CK256MP202
I need accurate timing for a digital input that I am utilising the high speed comparator for. When I refresh it e.g. try to zero the CCP2 timer, it only clears CCP2TMRH. I have tried to thrash it out with AI, but am not getting much traction there. I've tried manually clearing the registers + switching the CCP off and clearing it etc, but it does not allow me to switch it off when running. Reading is no issue at all.
setup is...
SETUP_CCP2( CCP_TIMER | CCP_DIV_BY_64 | CCP_SYSTEM_CLOCK | CCP_TIMER_32_BIT);
and to clear...
SET_TIMER_CCP2(0);
Any advice would be much apprechiated
happy new year  |
|