#Branch #Unconditional #PIC18F #microcontroller #PIC #PIC18
This video explains the concept of unconditional branch instruction in PIC microcontrollers. How one can use short branches in PIC Microcontroller in assembly language programming while programming the microcontroller. Short branch instruction (BRA) is used to jump to specific label and one can use it to repeat the specific code in one microcontroller for indefinite time.
What is the difference between a conditional and unconditional branch?
Unconditional Branch Instructions and Conditional branch Instructions. Unconditional branch Instructions It transfers the program sequence to the memory address given in the operand. Conditional branch Instructions Only if the condition is satisfied, the instructions executes.
The various types of control transfer instruction in Assembly Language include conditional and unconditional branches and call instructions. Looping in PIC assembly language will be performed using an instruction to decrement a counter and to jump to the top of the loop if the counter is not zero. The will be accomplished with the BNZ instruction. Other branch instructions jump conditionally, based on the value of the carry flag, the Z flag, or other bits of the status register. Unconditional branches can be long or short, depending on the location of the target address. Special attention will be be given to the effect of CALL and RCALL instructions on the stack.