Martin Guy wrote:
> Erm, sort of. Most ARM instructions take one cycle as long at the
> program is going in a straight line because in each clock cycle it has
> three or more instructions in its pipeline, all in various stages of
> execution.
[snip]
> Then there is the question of whether the instructions are in the CPU
> cache or have to be fetched from RAM... in the case of your tight loop
> I guess that will not be an issue after the first cycle.
This just means my guess as to the number of cycles for subs and bne was
somewhat optimistic. If they take more cycles it just means my delays are
slightly longer than expected. That works in my favour to a point. The delays
I need are the minimum values. If the actual delays are longer than needed it
means I have no problem meeting the timing requirements of the LCD display.
Mark Carlson wrote:
> I'm not sure why you would want to count cycles when you're running a
> multi-user, non-realtime OS (and your code is running from
> userland...) If you're already eating up CPU cycles, you may as well
> do a loop around the gettimeofday() function. This will let you delay
> your program with microsecond resolution
I wouldn't normally use a busy loop to kill time but I need time delays that
are less than 1 microsecond each. The delays are used in timing signals which
control an LCD display.
--
Cheers!
Kevin.
http://www.ve3syb.ca/ |"What are we going to do today, Borg?"
Owner of Elecraft K2 #2172 |"Same thing we always do, Pinkutus:
| Try to assimilate the world!"
#include <disclaimer/favourite> | -Pinkutus & the Borg
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|