Hi--
I'm having a problem with Instant Interrupts that I can't figure out... I'm using Darrell's Elapsed Timer with V3.2 of DT_INTS-18 and Reenter-PBP-18. The chip is an 18F4520 running at 16MHz. The interrupt-driven elapsed timer system works beautifully, but then I can no longer use the second PWM output, CCP2, which I have set up to output on portc.1. CCP1 works perfectly. This is true whether I use the HPWM command and PBP defines or set up the PWM registers directly as described in the data sheet.
What happens is that portc.1 goes low and stays that way. If I disable the DT includes and the interrupt handler, the PWM CCP2 port functions normally. I have checked and double checked things like the portb/c multiplexing and the tris output settings, etc. What I think is happening is something in Darrrell's code is clearing CCP2CON, but I haven't been able to find it.
Does anybody have any ideas to try?
Thanks--
--Alan






Bookmarks