execution time of the instruction
plmnb
Posts: 1
in BASIC Stamp
Hello,
I would like to ask if I can find information about the execution time of particular statements anywhere? I mean, among others, the conditional if statement and assigning the pin state to a variable.
Thank you in advance for your answer.
Comments
If you don't find the information you're looking for (and I suspect you won't), you can figure it out yourself using a logic analyzer, or any other device that can measure pulse widths (such as a second Basic Stamp). First make a program that does a
HIGH
immediately followed byLOW
on the same pin and measure how long the resulting pulse is. Then, put various instructions between theHIGH
andLOW
and see how much time the additional instructions add to the baseline pulse width.Welcome to the forums!
You might want to start at Tracy's site:
http://emesystems.com/OLDSITE/BS2speed.htm
and then:
http://emesystems.com/OLDSITE/BS2index.htm
Also remember that there are many instructions with variable execution times. For example, PULSIN is affected by the length of the incoming pulse, which can vary.