__delay_ms Function

Produce a delay of a specified number of milliseconds (ms).

Include

<libpic30.h>

Prototype

void __delay_ms(unsigned int time);

Argument

time number of ms to delay

Remarks

This function is implemented as a macro.

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