Positron Compiler Documentation

DelayMs

Positron16 · Revision 1.1.3.5 · PDF page 333

DelayMs Length

Delay execution for length x milliseconds (ms). Delays may be up to 65535ms (65.535 seconds) long.

Length can be a constant, variable, or expression.

Device = 24FJ64GA002      ' Select the device to compile for
Declare Xtal = 16

Dim MyByte as Byte
Dim MyWord as Word

MyByte = 50
MyWord= 1000
DelayMs 100               ' Delay for 100ms
DelayMs MyByte             ' Delay for 50ms
DelayMs MyWord             ' Delay for 1000ms
DelayMs MyWord + 10        ' Delay for 1010ms

DelayMs is oscillator independent, as long as you inform the compiler of the crystal frequency to use, using the Xtal directive.

See also : DelayCs, DelayUs.

View original PDF page 333Open page in PDFOriginal PDF page 333