Datasheet

Programming PIC Microcontrollers in BASIC - mikroElektronika
5.1.2 ClearBit – Clears the specified bit
Prototype
sub procedure ClearBit(dim byref Reg as byte, dim Bit as byte)
Description Clears <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
ClearBit(PORTC,7) ' clear bit RC7
5.1.3 TestBit – Tests the specified bit
Prototype
sub function TestBit(dim byref Reg as byte, dim Bit as byte) as byte
Description Tests <Bit> of register <Reg>. If set, returns 1, otherwise 0. 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
TestBit(PORTA,2)
' returns 1 if PORTA bit RA2 is 1, returns 0 otherwise
5.1.4 Lo – Extract one byte from the specified parameter
http://www.mikroelektronika.co.yu/english/product/books/picbasicbook/05.htm (5 sur 112)05/11/2004 02:20:52