Elapsed clock cycles
Nico S
Posts: 9
Hi there,
Is there anyway to measure the time elapsed between statements ?
Something like CNT on the propeller chip ?
TIA
Best regards,
Nico Schoemaker
Is there anyway to measure the time elapsed between statements ?
Something like CNT on the propeller chip ?
TIA
Best regards,
Nico Schoemaker
Comments
Typically the way this sort of thing is measured is by isolating the statement of interest and putting it in a loop that executes it a specific number of times (like 1000), preceding and following the loop with a PULSOUT statement and measuring the elapsed time using some kind of external timer. By using a large loop, the fixed overhead of the loop and the PULSOUT statements becomes a small part of the overall time. You can also remove the statement of interest from the loop and remeasure the total time, then subtract that from the measurement with the statement of interest in place.
Thanks a lot for your reply.
I was trying to get rid of the PAUSE commands, used for example in controling a servo(s), to free up some processing time.
Anyway thanks again.
Best regards,
Nico Schoemaker
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."
Thanks for the URL, indeed great info !!