Positron Compiler Documentation

DelayCs

Positron8 · Revision 4.0.6.5 · PDF page 325

DelayCs Length

Delay execution for an amount of instruction cycles.

Length can only be a constant with a value from 1 to 1000.

  DelayCs 100       ' Delay for 100 cycles

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

The length of a given instruction cycle is determined by the oscillator frequency. For example, running the microcontroller at it’s default speed of 64MHz will result in an instruction cycle of 62.5ns (nano seconds).

Because of code memory paging overheads, DelayCs is only available when using enhanced 14-bit core or 18F devices.

See also : DelayUs, DelayMs, Sleep, Snooze.

View original PDF page 325Open page in PDFOriginal PDF page 325