timing instructions

Questions about the BASICtools and MakeItC
Post Reply
YahooArchive
Posts: 1463
Joined: Fri Oct 19, 2012 5:11 am

timing instructions

Post by YahooArchive » Thu Oct 25, 2012 6:23 pm

A quick way to check the timing of a set of instructions-

#include <SPI.bas>

dim a(100) as string

x=1000 ' for more resolution make this 1000000
while x
x=x-1
' insert test code here

SPIIN(0,1,2,3,0,0,"",10,a)
loop

--------------- results ----------------------


Welcome back to ARMbasic Kernel[7.05] Copyright 2007,
Coridium Corp.


Programming Flash 2103...*+*+
... 2.45K code 0.25K data programmed
Executing...




... Finished in 275 ms

So for this SPIIN of 10 bytes takes 275 usec or average of 27usec per
byte

CAUTION, if you include print statements you will be waiting for th
19.2Kbaud operation



Post Reply