avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Using delay functions with variable F_CPU clock?


From: David VanHorn
Subject: Re: [avr-gcc-list] Using delay functions with variable F_CPU clock?
Date: Wed, 4 Mar 2009 13:45:59 -0500


 
The delay functions require a constant so the delay can be calculated at compile time. I would think that part of the problem is that you have to introduce more code to check the value of f_cpu and to calculate the delay. This pushes the delay calculation into run-time, plus it adds more code to check the condition, which has to be factored into the delay itself.
 
It seems reasonable to be able to construct a sit-and-spin delay that would take into account whatever is programmed into XDIV
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]