Originally Posted by Bruce
I will probably go for Loop 2 implementation..
(Assembly isn't an appealing choice!!)
However, is there any way to estimate the time required to implement this Loop (2). I need to calculate the time needed to decrement the counter, compare its current value to the end value & the repetition (go back to start of loop) of the body time...
I'm using a 20 MHz crystal as clock....
if it can't be estimated from BASIC code... can the .asm file generated by compiler in assembly help me estimate delay time in executing loop knowing the time for each assembly line code???
This is what i'm trying to do; generation of 40kHz pulses (25us)
Loop:
counter = 16
(set one o/p pin high
pause (delay) by 11 us
set o/p pin to low (zero)
puse (delay) by 10 us
decrement counter & compare it
repeat loop again
i need the total time of loop to be 25 microseconds....
HELP PLEASE!!!
Bookmarks