Positron Compiler Documentation

DelayMs

Source: Positron16 Compiler User Manual, PDF page 333

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 = 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

Note.

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.