bsf INTCON,7 ;GIE = 1
bsf INTCON,6 ;PEIE = 1 Enable peripheral interrupts
bsf PIE1,0 ; TMR1IE= 1 Enable TMR1
intcon bits 6 and 7 should already be set , setting them again should do no harm
pie1.0 is also set , setting it again can't hurt
it just wastes 12 cpu cycles
the problem lies elsewhere, PWM_VAL must be > 30 ,values from 0-29 wont work could that have happened




Bookmarks