piclist 2001\01\10\162358a >
Thread: Help! :) Error with FSR0 and MPLAB-C18?
www.piclist.com/techref/microchip/languages.htm?key=mplab
flavicon
face BY : Jeff Meyer email (remove spam text)



It seems that I am encountering an error in MPLAB-C18.  I have a procedure
that has a parameter passed to it.  That parameter is used as an index into
an array of structures.  If that procedure is interrupted, when the
interrupt handler returns, the wrong index is used to finish the
assignments.  For example, if this is the code that is running (ID is the
parameter, and is equal to 1 before the interrupt):

 DEBUG_ROLL=TIMERS[ID].ROLLOVERS_LEFT;

** Interrupt occurs here **

 DEBUG_ELAPSED=TIMERS[ID].ELAPSED;
 DEBUG_TIME=TIMERS[ID].TIME;

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

Anybody else seen anything like this?  What should I post to help out?

Thanks,
Jeff Meyer
Rockwell Collins, Inc.

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspam_OUTspammitvma.mit.edu with SET PICList DIGEST in the body


<OF1735FF95.54B3B474-ON862569D0.0074F284@collins.rockwell.com>

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...