When I work with the timer1 and timer 2 in picBasic, how can I distinguish which has interrupt the program?! wich flags?! And how I can do differents things depends on the interruption?!
In the ISR, the fist things to do are check the interrupt flags.
For example:
Code:
btfsc PIR1, TMR1IF
goto TMR1_interrupt
btfsc PIR1, TMR2IF
goto TMR2_interrupt
btf..... and so on
TMR1_interrupt: ;code for TMR1
TMR2_interrupt: ;code for TMR2