All right, clarified me. Thanks!If the details of how the destination address is computed do not matter, then you can use the GOTO instruction to make an unconditional transfer of control to the destination address. In the PIC16 architecture you have 'skip' instructions which evaluate a condition an either execute the next instruction or skip it. I do not believe that the original PIC16 architecture (e.g. 16F84 & 16F877A) has the concept of a relative branch instruction. However it appears the the PIC16F1xxx family members do support the BRA and the BRW instructions.
So sayeth the datasheet.BRA is an unconditional relative branch: execution transfers to <PC+constant>
GOTO is an unconditional absolute branch: execution transfers to <constant>
where <constant> is the number following the instruction.
Therefore, they do exactly the same thing, but the number following the instruction would be different.
At my university I specifically have the PIC18F452 and PIC16F877A models. So, I wanted to have the code for both of them.Out of curiosity, may I know why would you port some (working code) in the 18F family to another in the 16F realm which is more limited and with the added banking complication?
IIRC they are almost 100% pin compatible.
|Thread starter||Similar threads||Forum||Replies||Date|
|Writing SPI driver (Read ID) command help||Programming & Languages||7|
|Y||Controlling LED chaser speed via "pause" command||Microcontrollers||8|
|help me with LTspice command.||PCB Layout , EDA & Simulations||9|
|O||how to send a command from a master uC , help||Microcontrollers||4|
|G||PIC16F877A with SIM800L AT command ERROR||Microcontrollers||7|
by Jake Hertz