DELAY_MS - milliseconds

DELAY_MS - milliseconds

Language reference ›› Built-in procedures ›› Delay routines ››
Parent Previous Next

DELAY_MS(milliseconds)

Wait the given number of milliseconds.


<milliseconds>:

An integer constant, a WORD-sized variable or a computed expression.


Delays are implemented as loops and / or NOP and GOTO instructions, according to the required number of cycles.


The code is generated according to the declared processor frequency.

Impossible or inaccurate delays will generate warnings.

Due to internal mechanisms of PMP, resolution, minimum and maximum delay may be limited according to the processor frequency.

Delays do not use interrupts and so may be non accurate if there is lot of interrupts.


See also: DELAY, DELAY_NS, DELAY_CY, NOP, FREQUENCY.