Yes, the MPLAB simulator will give that to me, and show me what is on the stack. I've used that before and it is a very useful tool. This time it is a difficult program to simulate because of the IO. It woul= d be a lot of work to write the stimulation files and I'm not sure that is even possible. I think that I will have to go through it by hand. thanks for all your responses. Gordon Williams ----- Original Message -----=20 From: "Jan-Erik Soderholm" To: "Microcontroller discussion list - Public." Sent: Wednesday, June 01, 2011 4:10 AM Subject: Re: [PIC] Stack Depth > > > alan.b.pearce@stfc.ac.uk wrote 2011-06-01 10:37: > >> Using a pic16f886. > >> > >> Is there a way to determine stack depth so that it can be output for > >> diagnostic purposes? > > > > As others have said, no, but I seem to recall that MPLAB will determine > > stack depth while simulating, but haven't attempted to use that > > feature. > > I do not think it is something you "use", MP-SIM simply gives > an error if the stack under or overflows. Maybe you can also > see the actual depth, havn't seen (or looked for) that. > --=20 > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .