Positron Compiler Documentation

DelayMs

Source: Positron8 Compiler User Manual, PDF page 326

Syntax

DelayMs Length

Overview

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

Parameters

Length can be a constant, variable, or expression.

Example

Device = 18F25K20
Declare Xtal = 16
Dim MyByte as Byte = 50
Dim MyWord as Word = 1000
DelayMs 100
                        ' Delay for 100ms
DelayMs MyByte
                        ' Delay for 50ms
DelayMs MyWord
                        ' Delay for 1000ms
DelayMs MyWord + 10
                        ' Delay for 1010ms

Notes

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

See also : DelayCs, DelayUs, Sleep, Snooze.