DELAY_NS - nanoseconds

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

DELAY_NS(nanoseconds)

Wait the given number of nanoseconds.


<nanoseconds>:

An integer constant.


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_MS, DELAY_CY, NOP, FREQUENCY.