MikroElektronika PIC Microcontrollers PIC16 Fiche technique Page 47

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 194
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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
Vue de la page 46
1 2 ... 42 43 44 45 46 47 48 49 50 51 52 ... 193 194

Commentaires sur ces manuels

Pas de commentaire