[fpc-pascal] AVR Busy Wait implementation
christo.crause at gmail.com
Fri Jan 15 07:48:40 CET 2016
There is a lot of useful information in avr-gcc code, once you can see past
the peculiarities of C. See the implementation of avr-gcc's delay here:
cvs.savannah.gnu.org/viewvc/avr-libc/include/util/delay.h and delay_basic.h
in the same folder. Basically they use op codes with fixed cpu cycles to
construct the inside of the loop and use compile time constants to
calculate the number of iterations required for a delay. The focus of the
code is to get accurate delays down to a few cpu cycles.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal