Datasheet
Programming PIC Microcontrollers in BASIC - mikroElektronika
Introduction
BASIC was designed with focus on simplicity of use. Great number of built-in and library routines are included to help you
develop your applications quickly and easily.
5.1 Built-in Routines
BASIC 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.
5.1.1 SetBit – Sets the specified bit
Prototype
sub procedure SetBit(dim byref Reg as byte, dim Bit as byte)
Description Sets <Bit> of register <Reg>. Any SFR (Special Function Register) or variable of byte type can pass as valid
variable parameter, but constants should be in range [0..7].
Example
SetBit(PORTB,2) ' set bit RB2
http://www.mikroelektronika.co.yu/english/product/books/picbasicbook/05.htm (4 sur 112)05/11/2004 02:20:52