Hank, You could "time" the time it takes to enter the interupt and return. First replace the pause with a check for flag. set the flag low in the startup, then in the handler:your main routine will see the flag set so then:
- copy tmrl and tmrh to a variable (int_enter)
set your flag
return
- stop timer
jump out of main routine
grab tmrl and tmrh to a new variable (int_exit)
display int_enter and int_exit
reload timer
turn timer on
reset flag
return to main
This way you will have real time values for the lag in and lag out. This will be very intresting numbers so please post them. Seems like anyone dealing with stuff in time critical situations will find value in this.
Then you can add stuff to the handler to see how much time it takes to do x,y,z. In fact, I for one am very intrested in how long the "toggle" command takes. So taking that out and running to get some base numbers, then adding it back in, we will see the differance in the int_exit value.
Heck, Some day I may even have to do this myself. I am courious how long every command in PBP takes. I am from the ASM club. As such, I am used to being able to just count instructions to get execution times. With PBP, I have no way of knowing. Heck, even back when I was messing with BS1, they stated each instruction "cost" 200uS! thats a ton of time, but you knew what it was so you can account for it.
Bookmarks