User manual

mikroC PRO for dsPIC
MikroElektronika
155
Prototype
unsigned long Clock_kHz();
Description Function returns device clock in kHz, rounded to the nearest integer.
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.
Parameters None.
Returns Device clock in kHz, rounded to the nearest integer.
Requires Nothing.
Example
unsigned long clk;
...
clk = Clock_kHz();
Notes None.
Prototype
unsigned long Clock_MHz();
Description Function returns device clock in MHz, rounded to the nearest integer.
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.
Parameters None.
Returns Device clock in MHz, rounded to the nearest integer.
Requires Nothing.
Example
unsigned long clk;
...
clk = Clock_Mhz();
Notes None.
Prototype
unsigned long Get_Fosc_kHz();
Description Function returns device clock in kHz, rounded to the nearest integer.
Note that Get_Fosc_kHz is library function rather than a built-in routine; it is presented in this topic
for the sake of c?nvenience.
Parameters None.
Returns Device clock in kHz, rounded to the nearest integer.
Requires Nothing.
Example
unsigned long clk;
...
clk = Get_Fosc_kHz();
Notes None.
Clock_kHz
Clock_Mhz
Get_Fosc_kHz