Jump to content

Extra Plugins - Stopwatch Triggering

Recommended Posts

is there any way you could make it so we could auto-trigger the stopwatch by other methods than only output pins?


so far, to check timing-sensitive code using the auto-triggering I had to insert something like:


bit debug @ PORTA.0;


debug = 1;
<code here>
debug = 0;


and have the stopwatch trigger on that PORTA change. however, when trying to put in delays on the order of a few microseconds, where there are very few instructions occurring, adding in those instructions can skew the results rather significantly.


I just noticed that I can get the time between breakpoints by running to a breakpoint, manually starting the stopwatch, running to the next breakpoint, and manually stopping... which would eliminate the extra instructions skewing the results. however, that is a little tedious...


is there any way you could add an option to automatically trigger the stopwatch at each breakpoint? (thus timing the interval between each breakpoint and the previous one) that's the way it's done in MPLAB, which consequently is the ONLY reason that I have ever used MPLAB for anything whatsoever. essentially all it would have to be is an enable-disable button (like the "arm" button) that would do the equivalent of pressing "manual stop" and then "manual start" every time a breakpoint was reached.


a second, slightly more advanced feature request: could you add a stopwatch "tick" feature? what I am thinking of is a way to insert a different kind of breakpoint, that would trigger the stopwatch as mentioned above, but NOT stop program execution. it would be useful when used in conjunction with the "profiler", as you could easily let a program run free and see how much the execution time of a particular routine varied over a large number of calls with different data, etc.



Share this post

Link to post
Share on other sites



The plugin API doesn't currently have the functions required to add your stopwatch trigger on breakpoint, so other things would need to change to - but this can be done.


Some nice ideas :D, thanks




Share this post

Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...