Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/21/02 15:54
Read: times


 
#20039 - RE: How much Time taken by routines:
http://www.semiconductors.philips.com/acrobat/v...UIDE_1.pdf
Will tell you how many cycles the various instructions use. A cycle will be 1,4,6 or 12 clock times depending on your derivative.

A much simpler method is to wrap the routine in a loop that executes your snippet 10.000, 100.000 or even 1.000.000 times and changes the state of a LED on each expiration. Then use a stopwatch. This way a 500 uS loop will go for 500 seconds - stopwatch and observation should be precvise enough.

Your questions such as: "Q1. Value of R0 when 200 micro seconds have lapsed ??? " indicates that you intend to test r0, this will dramatically change your loop time.

A much better approach than "testing R0" would be to call the timing loop with r0 preloaded with a value rather than always loading zero.

Have fun,

Erik



List of 12 messages in thread
TopicAuthorDate
How much Time taken by routines:            01/01/70 00:00      
RE: kindly re write the code on paper:            01/01/70 00:00      
RE: How much Time taken by routines:            01/01/70 00:00      
RE: How much Time taken: Erik            01/01/70 00:00      
RE: How much Time taken by routines:            01/01/70 00:00      
RE: kindly re write the code on paper:            01/01/70 00:00      
RE: How much Time taken by routines:            01/01/70 00:00      
RE: #time_value: Erik            01/01/70 00:00      
RE: #time_value: Erik            01/01/70 00:00      
RE: How much Time taken, however            01/01/70 00:00      
RE: 1000000 loops for uSec. Erik.            01/01/70 00:00      
RE: 1000000 loops for uSec. Erik.            01/01/70 00:00      

Back to Subject List