Measuring the execution time of Spin code
Paul Baker
Posts: 6,351
The question how long a certain instruction or·section of Spin code takes to execute has been asked a few times. To answer a recent email question on this topic, I wrote some code to perform the task using one of the counters. This is the method Tracy Allen used to measure the execution speed of PBASIC commands, but this code performs the math for you and displays the number of clock cycles on a TV (and doesn't require an oscilloscope or logic analyzer). I hope some of you will find it useful when trying to figure out the most efficient method of writing Spin code.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Parallax Forums - If you're ready to learn, we're ready to help.