mikroElektronika PIC Microcontrollers PIC12 User Manual page 145

Mikroc user's manual
Table of Contents

Advertisement

mikroC
making it simple...
Vdelay_ms
Prototype
void Vdelay_ms(unsigned time_in_ms);
Description
Creates a software delay in duration of
Generated delay is not as precise as the delay created by
Example
pause = 1000;
// ...
Vdelay_ms(pause);
Delay_Cyc
Prototype
void Delay_Cyc(char Cycles_div_by_10);
Description
Creates a delay based on MCU clock. Delay lasts for 10 times the input parameter in
MCU cycles. Input parameter needs to be in range 3 .. 255.
Note that
this topic for the sake of convenience.
Example
Delay_Cyc(10);
Clock_Khz
Prototype
unsigned Clock_Khz(void);
Returns
Device clock in KHz, rounded to the nearest integer.
Description
Returns device clock in KHz, rounded to the nearest integer.
Example
clk = Clock_Khz();
MikroElektronika: Development tools - Books - Compilers
mikroC - C Compiler for Microchip PIC microcontrollers
// ~ one second pause
is library function rather than a built-in routine; it is presented in
Delay_Cyc
/* Hundred MCU cycles pause */
milliseconds (a variable).
time_in_ms
Delay_ms
.
page
137

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the PIC Microcontrollers PIC12 and is the answer not in the manual?

This manual is also suitable for:

Pic microcontrollers pic16Pic microcontrollers pic18

Table of Contents