AVR Instruction Set Nomenclature: Status Register (SREG ...
AVR Instruction Set Nomenclature: Status Register (SREG ...
AVR Instruction Set Nomenclature: Status Register (SREG ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
BRTC - Branch if the T Flag is Cleared<br />
<strong>Instruction</strong> <strong>Set</strong><br />
Description:<br />
Conditional relative branch. Tests the T flag and branches relatively to PC if T is cleared. This instruction branches relatively<br />
to PC in either direction (PC - 63 ≤ destination ≤ PC + 64). The parameter k is the offset from PC and is represented<br />
in two’s complement form. (Equivalent to instruction BRBC 6,k).<br />
Operation:<br />
(i) If T = 0 then PC ← PC + k + 1, else PC ← PC + 1<br />
Syntax: Operands: Program Counter:<br />
(i) BRTC k -64 ≤ k ≤ +63 PC ← PC + k + 1<br />
PC ← PC + 1, if condition is false<br />
16-bit Opcode:<br />
<strong>Status</strong> <strong>Register</strong> (<strong>SREG</strong>) and Boolean Formulae:<br />
Example:<br />
1111 01kk kkkk k110<br />
I T H S V N Z C<br />
- - - - - - - -<br />
bst r3,5 ; Store bit 5 of r3 in T flag<br />
brtc<br />
...<br />
tclear ; Branch if this bit was cleared<br />
tclear: nop ; Branch destination (do nothing)<br />
Words: 1 (2 bytes)<br />
Cycles: 1 if condition is false<br />
2 if condition is true<br />
33