Spent a very happy afternoon reading up on MIBAM - can't wait to try it out (is there a later version of the .pbp code or is the v1.0 you posted on the melbas page the one I should use?).
In preparation for that, I converted the now-workiing code to use Timer2. I think that since Timer2 is 8-bit (versus 16-bit for Timer1) that I don't need to worry about using the Least Significant register as you did with Timer1 but can just use TMR2:
And then this to turn it on:Code:CCPR1val CON EXT : @CCPR1val = (OSC*1000000/4)/ BLINKYFREQ ;CCPR1 VAR WORD EXT : @CCPR1 = CCPR1L Timer2 VAR WORD EXT : @Timer2 = TMR2 CCPIF VAR PIR1.5
Is that it?Code:;-- setup CCP1 and Start Timer2 -- CCPR1 = CCPR1val ; set compare value CCP1CON = %00001011 ; compare mode, special event Timer2 = 0 ; clear Timer2 T2CON.0 = 1 ; start Timer2




Bookmarks