sraiderk
 
 
  Joined: 09 Feb 2005 Posts: 48
  
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				| Timer Interrupts for PIC18... | 
			 
			
				 Posted: Mon Mar 26, 2007 12:00 pm     | 
				     | 
			 
			
				
  | 
			 
			
				if I used the timer0 and timer1 interrupt, what is the result for the following condition. (for pic 18 series) .
 
 
Case 1: Both timer interrupt occurs at the same time.
 
 
Case 2: Timer0 interruptted , Then MCU execute the interrupt routine. At that point (when MCU execute the interrupt routine) Timer1 is interrupted.
 
 
Case 3: Timer0 interruptted. First code line in Timer0 interrupt routine is the "disable_interrupts(Timer1)" The last line in the Timer0 interrupt routine is the "enable_interrupts(Timer1)".
 
 
Timer0 interrupt routine()
 
{
 
  disable_interrupts(Timer1);
 
  ....;
 
  ....;
 
  x;
 
 ...;
 
 ...;
 
enable_interrupts(Timer1);
 
}
 
 
if the timer1 overflow occurs at x. the interrupt occurs or not after "enable_interrupts(Timer1)" code line for pasted overflow? | 
			 
		  |