MikroElektronika PIC Microcontrollers PIC16 Datový list Strana 47

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 194
  • Tabulka s obsahem
  • ŘEŠENÍ PROBLÉMŮ
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 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
Zobrazit stránku 46
1 2 ... 42 43 44 45 46 47 48 49 50 51 52 ... 193 194

Komentáře k této Příručce

Žádné komentáře