MikroElektronika PIC Microcontrollers PIC16 Ficha de datos Pagina 47

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 194
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 46
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
Vista de pagina 46
1 2 ... 42 43 44 45 46 47 48 49 50 51 52 ... 193 194

Comentarios a estos manuales

Sin comentarios