One of your questions and maybe future questions is answered here.
http://www.picbasic.co.uk/forum/showthread.php?t=11116
your code.
If that is just the leg routine and you have more then I do not see a problem there. And with it only getting part way through it....
Kind of sounds like it good be a power supply problem causing a brown out. Can you monitor the voltage coming into the PIC? Maybe add if you do not have one a capacitor or two between VSS and VDD.
At this point a schematic, configs and the whole code might help us figure it out. I am guessing you did rewrite this as Joe suggested and loose the BS2 stuff?
Bookmarks