Re: > >When the return from interrupt occurs, ID is now 0. So the code ends up >indexing the wrong element of the array... > Make sure you are saving the temporary data segment in the declaration for your ISR -- I think it's called ".tmpdata". Also, make sure you have the latest and greatest version of MPLAB-C18 -- several updates occurred in the past few months, and I, too was bitten by a int-save bug until I got the update AND I additionally saved that segment. -- ______________________________________ Andrew E. Kalman, Ph.D. aek@pumpkininc.com -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.