mikroC

making it simple...

Vdelay_ms

mikroC - C Compiler for Microchip PIC microcontrollers

Prototype

void Vdelay_ms(unsigned time_in_ms);

 

 

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.

 

 

Example

pause = 1000;

 

// ...

 

Vdelay_ms(pause); // ~ one second 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 Delay_Cyc is library function rather than a built-in routine; it is presented in

 

this topic for the sake of convenience.

 

 

Example

Delay_Cyc(10); /* Hundred MCU cycles pause */

 

 

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();

 

 

 

 

page

 

MikroElektronika: Development tools - Books - Compilers

137