Datasheet
Delay_us
Delay_ms
Vdelay_ms
108
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Specifics
mikroC PRO for AVR
CHAPTER 3
Prototype
void Delay_us(const unsigned long time_in_us);
Returns Nothing.
Description
Creates a software delay in duration of time_in_us microseconds (a constant).
Range of applicable constants depends on the oscillator frequency.
This is an “inline” routine; code is generated in the place of the call, so the call
doesn’t count against the nested call limit.
Requires Nothing.
Example
Delay_us(1000); /* One millisecond pause */
Prototype
void Delay_ms(const unsigned long time_in_ms);
Returns Nothing.
Description
Creates a software delay in duration of time_in_ms milliseconds (a constant).
Range of applicable constants depends on the oscillator frequency.
This is an “inline” routine; code is generated in the place of the call, so the call
doesn’t count against the nested call limit.
Requires Nothing.
Example
Delay_ms(1000); /* One second pause */
Prototype
void Vdelay_ms(unsigned time_in_ms);
Returns Nothing.
Description
Creates a software delay in duration of time_in_ms milliseconds (a variable).
Generated delay is not as precise as the delay created by Delay_ms.
Note that
Vdelay_ms is library function rather than a built-in routine; it is present-
ed in this topic for the sake of convenience.
Requires Nothing.
Example
pause = 1000;
// ...
Vdelay_ms(pause); // ~ one second pause