_delay3 Builtin

A builtin function that delays execution.

Include

<xc.h>

Prototype

void _delay3(unsigned char loops);

Argument

loops
The number of loops, each of 3 cycles, to delay

Remarks

This is an inbuilt function that is expanded by the code generator. When called, this routine expands to an in-line assembly delay sequence. The sequence will consist of code that delays for 3 times the number of instruction cycles that is specified as the argument. The argument must be a constant expression and less than 257.

The _delay3() builtin function will use a loop to implement the delay.

Example

#include <xc.h>

int main (void)
{
  _delay3(10);    // delay for 30 cycles
}