EasyManua.ls Logo

Atmel AVR

Atmel AVR
191 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
101. SBIS – Skip if Bit in I/O Register is Set
101.1. Description
This instruction tests a single bit in an I/O Register and skips the next instruction if the bit is set. This
instruction operates on the lower 32 I/O Registers – addresses 0-31.
Operation:
(i) If I/O(A,b) = 1 then PC ← PC + 2 (or 3) else PC ← PC + 1
Syntax: Operands: Program Counter:
(i) SBIS A,b 0 ≤ A ≤ 31, 0 ≤ b ≤ 7 PC ← PC + 1, Condition false -
no skip
PC ← PC + 2, Skip a one word
instruction
PC ← PC + 3, Skip a two word
instruction
16-bit Opcode:
1001 1011 AAAA Abbb
101.2. Status Register (SREG) and Boolean Formula
I T H S V N Z C
Example:
waitset: sbis $10,0 ; Skip next inst. if bit 0 in Port D set
rjmp waitset ; Bit not set
nop ; Continue (do nothing)
Words 1 (2 bytes)
Cycles 1 if condition is false (no skip)
2 if condition is true (skip is executed) and the instruction skipped is 1 word
3 if condition is true (skip is executed) and the instruction skipped is 2 words
Cycles XMEGA 2 if condition is false (no skip)
3 if condition is true (skip is executed) and the instruction skipped is 1 word
4 if condition is true (skip is executed) and the instruction skipped is 2 words
Atmel AVR Instruction Set Manual [OTHER]
Atmel-0856L-AVR-Instruction-Set-Manual_Other-11/2016
153

Table of Contents

Related product manuals