Bob Axtell wrote: > Harold Hallikainen wrote: > >> PIC question: Does MPLAB have a way to profile my code so I can figure out >> where it's spending all that time? >> >> >> >> > Did anybody answer you? > > I normally clear an unused port pin when I idle then set it when I do > something. This allows me to > measure with the scope the amount of time the system is busy. > > This is especially useful in interrupts, because if you set when the > interrupt is entered, then clear > when you leave, it allows you to verify when the interrupt is > overrunning, a tough situation to > troubleshoot. > > --Bob Axtell > Also looks cool to have an LED on that pin, (depending on the load your getting) I use it for my power light, it lets you know stuff is happening. A static "on" power light means that yes power was applied and .25 of a second later the damn thing locked up. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist