Just test your interrupt flag bits in the int handler. These tell you which source generated the interrupt condition.
Code:ORG 0x4 ; save state if needed here ISR btfss INTCON,T0IF ; if TMR0 interrupt, handle it goto RB_INT ; else skip to RB_INT T0_INT ; CODE 2......(ON TOIE) bcf INTCON,T0IF ; clear TMR0 int flag, and run handler ; insert your timer0 int handler here RB_INT ; CODE 1..... (ON RBIE) bcf INTCON,RBIF ; clear RB int flag, and run handler ; insert your RB int handler here ISR_EXIT ; restore state if needed here retfie


						
					
				
				
				
				
			

Bookmarks