I have a simple program that runs the (timer2) PWM reliably, scope measurements confirm timing of pulse width and the rate as well. I add a simple 256 location lookup table to change the PW on a cyclic basis. Still OK but not exactly verified with scope on a dynamic basis, tho verified that i get the proper PW at setting of CCPR1L.
Now, here is when i get into trouble; adding an interrupt.
Number one: exactly when is that interrupt hit, at end of the period, or at end of the pulse? (note if CCPR1L=0 there ain't no pulse, at one it is 200nSec and at 255 the low time is 200nSec)?
Number two: exactly what code and what order is required for reset before i kick it back on with BCF PIR1,TMR2IF and BSF INTCON,GIE?
The simulator is of no help (for me). I do know that i better have all instructions execute from reset until i kick on the interrupt (or i am really SOL).
Thanks.