User`s manual
mikroBASIC
- Basic Compiler for Microchip PIC microcontrollers
mikroBasic compiler incorporates a set of built-in functions and procedures. They
are provided to make writing programs faster and easier. You can call built-in
functions and procedures in any part of the program.
Routines SetBit, ClearBit and TestBit are used for bit manipulation. Any SFR
(Special Function Register) or variable of byte type can pass as valid variable
parameter, but constants should be in range [0..7].
Routines Lo, Hi, Higher and Highest extract one byte from the specified parame-
ter. Check the examples for details.
Routines Delay_us and Delay_ms create a software delay in duration of COUNT
microseconds or milliseconds, respectively.
MikroElektronika:
Development
tools
-
Books
-
Compilers
mikroBASIC
making it simple...
105
page
BUILT-IN ROUTINES
Routines
sub procedure SetBit(dim byref REG as byte, dim BIT as byte)
sub procedure ClearBit(dim byref REG as byte, dim BIT as byte)
sub function TestBit(dim byref REG as byte, dim BIT as byte) as byte
sub function Lo(dim arg as byte..longint) as byte
sub function Hi(dim arg as word..longint) as byte
sub function Higher(dim arg as longint) as byte
sub function Highest(dim arg as longint) as byte
sub procedure Delay_us(const COUNT as word)
sub procedure Delay_ms(const COUNT as word)
sub function Length(dim text as string) as byte