MikroElektronika PIC Microcontrollers PIC16 Spezifikationen Seite 160

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 266
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 159
mikroElektronika | Free Online Book | PIC Microcontrollers | Chapter 9: Instruction Set
Number of cycles: 1 or 2 depending on bit b
EXAMPLE:
....
LAB_01 BTFSC REG,1 ; Test bit 1 of REG
LAB_02 .... ; Skip this line if bit = 1
LAB_03 .... ; Jump here if bit = 0
Before instruction execution: The program counter was at address
LAB_01.
After instruction:
- if bit 1 of REG is cleared, program counter points to address
LAB_03.
- if bit 1 of REG is set, program counter points to address
LAB_02.
BTFSS - Bit test f, Skip if Set
Syntax: [label] BTFSS f, b
Description: If bit b of register f is 1, the next instruction is discarded and a NOP is
executed instead, making this a two-cycle instruction.
Operation: Discard the next instruction if f(b) = 1
Operand: 0 f 127, 0 b 7
Status affected: -
Number of cycles: 1 or 2 depending on bit b
EXAMPLE:
....
LAB_01 BTFSS REG,3 ; Test bit 3 of REG
LAB_02 .... ; Skip this line if bit = 0
LAB_03 .... ; Jump here if bit = 1
Before instruction execution: The program counter was at address
http://www.mikroe.com/en/books/picmcubook/ch9/ (11 of 35)5/3/2009 11:35:12 AM
Seitenansicht 159
1 2 ... 155 156 157 158 159 160 161 162 163 164 165 ... 265 266

Kommentare zu diesen Handbüchern

Keine Kommentare