User manual

156
mikoBasic PRO for dsPIC30/33 and PIC24
MikroElektronika
Prototype
sub function Clock_MHz() as 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
sub function Get_Fosc_kHz() as 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
sub function Get_Fosc_Per_Cyc() as 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
dim clk_per_cyc as word
...
clk_per_cyc = Get_Fosc_Per_Cyc()
Notes None.
Get_Fosc_Per_Cyc