Edward Cooper wrote : > I have some code which handles... Could you define "handles" ? > ...a string from the serial port in the ISR (using USART receive > interrupt), effectively hanging the processor for a short time. Define "short time" ! > During this period I will have multiple TMR0's occurring > of with I can't miss one because its using them to rack up a timer (in > milliseconds) for a time critical process. Aha ! So "short" above is > 1ms, right ? But 1ms whould be plenty of time to save the character from the USART. > Now I'm not entirely clear if another interrupt can occur while one is > in process? > I'm thinking it can't because it would just mess up the > PUSH and POP process, or would it!? The specific interrupt *flag* can be set, but the interrupt jump will not occure before you leave the current ISR. > Basically the TMR0 process is very short, And the you must make the USART ISR shorter then the intervall between two TMR0 interrupts. This should be no probalem at all. You have plenty of instructions in 1 ms to save in incomming character ! > I just need it to occur while the processor is still dealing... Define "dealing" ! > with the serial receive. > > I think I should really look into handling this serial receive outside > of the interrupt? You should/could save the incomming character in an UART ISR, but do whatever has to be done about it, in the main loop. Just set a flag in the UART ISR saying "there is a new character received !", and let the main loop check this flag. Jan-Erik. -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body