Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   INCONbits.GIEL usage (http://www.chiefdelphi.com/forums/showthread.php?t=24692)

seanwitte 02-02-2004 20:38

INCONbits.GIEL usage
 
I have a question about the global low priority interrupt bit. We're using timer3 to sample and integrate a gyro at 100Hz. Since its using the ADC I want to make sure that mainline code doesn't get interrupted in the middle of an ADC conversion.

In the mainline code I think we want to set the GIEL bit low, do a conversion, then set it high again. If the timer interrupt event occurs during the conversion, will the timer3 interrupt bit stay high so that it gets serviced right after resetting the GIEL bit? In the data sheets it looks like the GIEL bit just keeps the low priority vector code from running, but I'm new to the PIC and would like to verify with someone who knows their way around the chip.

Jay Lundy 02-02-2004 23:20

Re: INCONbits.GIEL usage
 
Quote:

Originally Posted by seanwitte
I have a question about the global low priority interrupt bit. We're using timer3 to sample and integrate a gyro at 100Hz. Since its using the ADC I want to make sure that mainline code doesn't get interrupted in the middle of an ADC conversion.

In the mainline code I think we want to set the GIEL bit low, do a conversion, then set it high again. If the timer interrupt event occurs during the conversion, will the timer3 interrupt bit stay high so that it gets serviced right after resetting the GIEL bit? In the data sheets it looks like the GIEL bit just keeps the low priority vector code from running, but I'm new to the PIC and would like to verify with someone who knows their way around the chip.

All interrupts must be cleared in software so I'm pretty sure the answer is yes.


All times are GMT -5. The time now is 04:19.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi