> I am having problems with the PIC ceasing to work after a certain > number of instructions has been used up. PICs don't get "used up" as instructions are executed. > The problem I am having (and have been having for over 2 weeks now) > is that any time I would add some "code-intense" routines the PIC > would stop working when programmed. To see where the problem occurs I > started with a piece of working code. Then I started adding NOPs > until it crapped out. The PIC doesn't just stop working but it stays > in routines it shouldn't stay in, and skips others that it must go > to, etc. OK, so you have a bug in your code. This happens to everybody. Now you have to find it. It seems like your setup should allow for good debugging in the simulator. Try to simulate enough input so that you can watch it step thru every section at least once. The bugs will probably be obvious. It could be something as simple as forgetting the ",w" after a file register operation when you meant the result to go into W (that seems to be my personal most common mistake), or wrong bank settings. > I tried the same code (with some minor processor-specific changes) on > a PIC16F876 and a PIC16F628 with identical results. I am using MPLAB > (v. 5.00.16) and PicStart Plus running in WindowsXP. That kind of voodoo debugging is a waste of time. Figure out what is really going on instead of poking at it with wild guesses. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body