8.8.3 NOP Macro
A macro that performs no operation.
Include
<xc.h>
Prototype
void NOP(void);
Remarks
This macro executes a nop
instruction. A nop
instruction can be used, for example, to introduce a small delay, to ensure safe
execution of code when the device is in a certain state, or as a convenient place to
attach a breakpoint for debugging purposes.
Example
#include <xc.h>
void delay10(void) {
for (volatile char i=0; i!= 10; i++)
NOP();
return;
}