User manual
mikroBasic PRO for PIC32
MikroElektronika
151
Prototype
sub function TestBit(dim register_, rbit as byte) as byte
Description Function tests if the bit rbit of register is set. If set, function returns 1, otherwise returns 0.
Parameter rbit needs to be a variable or literal with value 0..7. See Predened globals and constants
for more information on register identiers.
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 - register_: desired register
- rbit: desired bit
Returns If the bit is set, returns 1, otherwise returns 0.
Requires Nothing.
Example
ag = TestBit(PORTE, 2) ‘ 1 if RE2 is set, otherwise 0
Notes None.
TestBit
Prototype
sub procedure Delay_us(const time_in_us as longword)
Description Creates a software delay in duration of time_in_us microseconds.
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 time_in_us: delay time in microseconds. Valid values: constant values, range of applicable
constants depends on the oscillator frequency
Returns Nothing.
Requires Nothing.
Example
Delay_us(1000) ‘ One millisecond pause
Notes None.
Delay_us