User manual

155
mikoPascal PRO for dsPIC30/33 and PIC24
MikroElektronika
Prototype
function Clock_MHz() : word;
Description Returns device clock in MHz, rounded to the nearest integer.
This is an “inline” routine; the code is generated in the place of the call.
Parameters None.
Returns Device clock in MHz, rounded to the nearest integer.
Requires Nothing.
Example
clk := Clock_MHz();
Notes None.
Prototype
function Get_Fosc_kHz() : longint;
Description Function returns device clock in kHz, rounded to the nearest integer.
Parameters None.
Returns Device clock in kHz.
Requires Nothing.
Example
clk := Get_Fosc_kHz();
Notes Get_Fosc_kHz is a library function rather than a built-in routine; it is presented in this topic for the
sake of convenience.
Clock_MHz
Get_Fosc_kHz
Prototype
function Get_Fosc_Per_Cyc() : word;
Description Function returns device’s clock per cycle, rounded to the nearest integer.
Note that Get_Fosc_Per_Cyc is library function rather than a built-in routine; it is presented in this
topic for the sake of convenience.
Parameters None.
Returns Device’s clock per cycle, rounded to the nearest integer.
Requires Nothing.
Example
var clk_per_cyc : word;
...
clk_per_cyc := Get_Fosc_Per_Cyc();
Notes None.
Get_Fosc_Per_Cyc