Besides all the suggestions about disabling GIE, there's another way of processing: use double (or more, maybe ring) buffering. This is especially useful if you can't permit to loose any processor time. Stef Mientki Marcel van Lieshout wrote: >Hello group, > >I have a routine as part of my main loop which does some math on 32bit >integers. The integervalues are stored into the variables by the >interrupt-routine. It can happen, of course, that my main routine is >fetching the values while the interruptroutine is storing new values into >the variables. This overlap would be at least 8 cycles (fetch four >bytes/store four bytes). Is it possible to hold off interrupt processing >for, let's say, a dozen cycles? Are there any other failproof solutions? > >Regards, > >Marcel van Lieshout > >-- >http://www.piclist.com hint: The PICList is archived three different >ways. See http://www.piclist.com/#archives for details. > > > -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.