DelayUs
Positron16 · Revision 1.1.3.5 · PDF page 334
Syntax
DelayUs Length
Overview
Delay execution for length x microseconds (us). Delays may be up to 65535us (65.535 milliseconds) long.
Parameters
Length can be a constant, variable, or expression.
Example
Device = 24FJ64GA002 ' Select the device to compile for
Declare Xtal = 16
Dim MyByte as Byte
Dim MyWord as Word
MyByte = 50
MyWord= 1000
DelayUs 1 ' Delay for 1us
DelayUs 100 ' Delay for 100us
DelayUs MyByte ' Delay for 50us
DelayUs MyWord ' Delay for 1000us
DelayUs MyWord + 10 ' Delay for 1010us
Note.
DelayUs is oscillator independent, as long as you inform the compiler of the crystal frequency to use, using the Xtal directive.
See also : DelayUs, DelayMs.
