Hi I have setup TMR2 in the beginning of the program.Now I need to reset TMR2 in the middle of the program by pressing a button.
what i want to know is do I need to write all this lines including PR2 register,pre scaler etc.. or only bsf INTCON,PEIE is enough for reset the TMR2?
what i want to know is do I need to write all this lines including PR2 register,pre scaler etc.. or only bsf INTCON,PEIE is enough for reset the TMR2?
Code:
movlw .249
movwf PR2
bsf INTCON,PEIE
bsf INTCON,GIE