There is no way to write or read the stack on the PIC16F886 according to th= e docs so your method would not work. Regards, Gordon Williams ----- Original Message -----=20 From: "RussellMc" To: "Microcontroller discussion list - Public." Sent: Wednesday, June 01, 2011 10:27 AM Subject: Re: [PIC] Stack Depth > This time it is a difficult program to simulate because of the IO. It would > be a lot of work to write the stimulation files and I'm not sure that is > even possible. Without digging into what stack access and manipulation is possible on that device: Is it not possible to prewrite the stack with known data and then examine it explicitly or implicitly after running the program or on diagnostic occasions during operation to see how close it has come to its bounds, or whether it has exceeded them. Russell --=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 .