User manual
152
mikoBasic PRO for dsPIC30/33 and PIC24
MikroElektronika
Prototype
sub function Ord(dim character as char) as byte
Description Function returns ASCII code of the character.
This is an “inline” routine; the code is generated in the place of the call.
Parameters - character: input character
Returns ASCII code of the character.
Requires Nothing.
Example
c = Ord(“A”) ‘ returns 65
Notes None.
Ord
Prototype
sub procedure SetBit(dim byref register_ as word, dim rbit as byte)
Description Function sets the bit rbit of register_. Parameter rbit needs to be a variable or literal with
value 0..15. For more information on register identiers see Predened Globals and Constants .
This is an “inline” routine; the code is generated in the place of the call.
Parameters - register_: desired register
- rbit: desired bit
Returns Nothing.
Requires Nothing.
Example
SetBit(PORTB, 2) ‘ Set RB2
Notes None.
SetBit
Prototype
sub procedure ClearBit(dim byref register_ as word, dim rbit as byte)
Description Function clears the bit rbit of register. 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 Nothing.
Requires Nothing.
Example
ClearBit(PORTC, 7) ‘ Clear RC7
Notes None.
ClearBit