Hi guys, I'm working on a project and using PIC16F877A. I need to use multiple interrupts sources as TMR0, TMR1, RB0 etc. but i don't know how to proccess them in different interrupt routines. Is there any way to direct them to releated interrupt routine other than polling their interrupt flags?
I mean, I know following codes won't work but is there a way to use interrupts like following codes,
Or do I must use polling methode like followingCode:ON TMR0 INTERRUPT GOTO tmr0_int ON TMR1 INTERRUPT GOTO tmr1_int ON RB0 INTERRUPT GOTO rb0_int
PS: I would not prefer polling methode since it will lose time while checking flags, it would be great if there is a way to run releated interrupt subroutine directly like some other microcontroller modelsCode:ON INTERRUPT GOTO INTCHCK .... .... INTCHCK: IF INTCON.2=1 THEN GOTO tmr0_int ENDIF IF PIR.0=1 THEN GOTO tmr1_int ENDIF IF INTCON.0=1 THEN GOTO rb0_int ENDIF


 
						
					 
			 
			 
			 
					
					 Hot to handle multiple interrupt sources?
 Hot to handle multiple interrupt sources?
		 
				
				
				
				
			
 
			
Bookmarks