Jim Durand wrote: > I'm suffering from stack overflows on a 17c42 .... BUT, I've done > a thorough analysis of my software and there is no way I should be > overflowing the 16 word stack. Nevertheless, Jim, you ARE overflowing it... So your analysis must not have been thorough ENOUGH. > As I understand the spec sheet, an interrupt and a call each use one > word of the 16 word stack. Correct. > There isn't anything else that affects the stack is there? No. > Also a "pending" interrupt (one asserted while interrupts are > disabled) does not use any stack - the corresponding interrupt > request bit is merely set - correct? Correct. > I've tallied the max stack usage of all my routines and I should > be using at most 10 slots. .... I think I'm missing something. Any > thoughts? Well... Obviously, your software isn't doing what you intend. Do you perform any direct writes to the Program Counter? Perhaps there's a bug in one of them and you're accidentally pointing the PC at a subroutine call. Do you have an emulator? If so, I can suggest some debugging techniques that should help you isolate the problem pretty quickly... Let me know. -Andy === Meet other PICLIST members at the Embedded Systems Conference: === 6:30 pm on Wednesday, 1 October, at Bytecraft Limited's booth. === === For more information on the Embedded Systems Conference, === see: http://www.embedsyscon.com/ === Andrew Warren - fastfwd@ix.netcom.com === Fast Forward Engineering - Vista, California === http://www.geocities.com/SiliconValley/2499