4.4.6 __delay_us Function
Produce a delay of a specified number of microseconds (us).
Include
<libpic30.h>
Prototype
void __delay_us(unsigned int time);
Argument
time |
number of us to delay |
Remarks
This function is implemented as a macro. The minimum delay is equivalent to 12 instruction cycles.
Default Behavior
This function relies on a user-supplied definition of FCY to represent the instruction
clock frequency. FCY must be defined before header file libpic30.h
is included. The specified delay is converted to the equivalent number of instruction
cycles and passed to __delay32()
. If FCY is not defined, then
__delay_ms()
is declared external, causing the link to fail unless
the user provides a function with that name.
File
delay32.s