Thanks for the tips What I did was use the whole 80 locations of BANK2 to act as a buffer. I needed a complete sentence before I could process the data. Using this technique works well, but seems to waste a lot of memory locations. A flag is then set once the buffer wither fills up or the end character is read and then a routine in the main loop does all the processing as slowly, and throwing away of junk, as slowly as it wants. BTW it was NMEA from a GPS, and some of the sentences it sends are quite long. Cheers for the help. Ed On 25 Mar 2004, at 19:06, Jan-Erik Soderholm wrote: > 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 -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body