I didn't pickup what ver of pbp talat was using , and I'm not sure if the chk?rp macro exists in early versions
but try
if that fails tryCode:Asm PWM_INT CHK?RP CCP1CON movlw 9 ; compare mode clrf CCP1CON ; clear reg movwf CCP1CON ; Set reg CHK?RP PWM_VAL movf PWM_VAL+1,W ; hb CHK?RP CCPRIL movwf CCPR1H ; put CHK?RP PWM_VAL movf PWM_VAL,W ; lb CHK?RP CCPRIL movwf CCPR1L ; put banksel 0 bsf INTCON,7 ;GIE = 1 bsf INTCON,6 ;PEIE = 1 Enable peripheral interrupts bsf PIE1,0 ; TMR1IE= 1 Enable TMR1 bcf PIR1,0 ; TMR1IF = 0 Clear Timer1 Int Flag RETFIE ; Return from Interrupt EndAsm
banksel CCP1CON OR WHATERVER SFR
OR
read data sheet and find what bank each sfr is in
with all that bank switching the effort may be pointless




Bookmarks