piclist 2001\01\11\090517a >
Thread: Help! :) Error with FSR0 and MPLAB-C18?
face picon face BY : Olin Lathrop email (remove spam text)

> ** Interrupt occurs here **
> When the return from interrupt occurs, ID is now 0.  So the code ends up
> indexing the wrong element of the array...

Sounds like the interrupt is trashing some state.  Is the interrupt routine
saving/restoring FSR?  Take a look at the assembly code generated for the
lines above and see what resources it uses.

Olin Lathrop, embedded systems consultant in Devens Massachusetts
(978) 772-3129, TakeThisOuTolin@spam@spamKILLspamembedinc.com, http://www.embedinc.com

http://www.piclist.com hint: To leave the PICList

<001701c07bd1$5842d490$260bf6cd@pc> 7bit

See also: www.piclist.com/techref/microchip/languages.htm?key=mplab
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Help! :) Error with FSR0 and MPLAB-C18?

month overview.

new search...