
Originally Posted by
sayzer
Therefore, you will need to use ASM routine to create a sensitive uS delay.
Not so - try this (with 20Mhz xtal 4 instructions = 1 uS)
Code:
Main:
Gosub Delay_10 ' 10 uS delay
Gosub Delay_1 ' 1 us delay
GOTO Main
' *** Delay 10 us Subroutine (2 instructions to get here and 2 to get back)
Delay_10:
Gosub Delay_1
Gosub Delay_1
Gosub Delay_1
Gosub Delay_1
Gosub Delay_1
Gosub Delay_1
Gosub Delay_1
Gosub Delay_1
Gosub Delay_1
Return
' *** Delay 1 us Subroutine (2 instructions to get here and 2 to get back)
Delay_1:
Return
END
Paul Borgmeier
Salt Lake City, UT
USA
__________________
Bookmarks