One simple way is to assign an unused pin to an output then have it go HI just before the portion of code you need to measure then go LOW immediately afterwards. This output is now your code elapsed time o-scope test point!
Simple example:
Code:
Test VAR PORTB.2 ' Assign a name to the unused pin
Test=0 ' Set pin low at top of program
'Some of your program
Test=1 ' Set output HI
Your chunk of program here to be timed
Test=0 ' Set output LO
Rest of program continues from here
I use this alot and the cool thing about it is I can move it anywhere and have it trigger multiple times when looking timer activity. I'm sure there are slicker ways but this works for me.
Bookmarks