BRA command in PIC16F877A

Status
Not open for further replies.

Dragnovith

Junior Member level 1
Joined
Apr 17, 2021
Messages
17
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
104
Hi, on PIC18 it is possible to use BRA, but which command is relative to BRA on PIC16? Was it GOTO?
For example I would like to use a BRA SENSOR, but on the PIC16.
 
Last edited by a moderator:

Solution
GOTO will work if you know the destination address but the only branching on 8-bit devices is forwards or backwards 127 addresses by loading the offset into W and adding it to the program counter. Be aware that you may create an overflow/underflow of the high register of PC if your branch crosses a page boundary.

PIC18 are far more advanced devices than PIC16, particularly when it comes to addressing.

Brian.
GOTO will work if you know the destination address but the only branching on 8-bit devices is forwards or backwards 127 addresses by loading the offset into W and adding it to the program counter. Be aware that you may create an overflow/underflow of the high register of PC if your branch crosses a page boundary.

PIC18 are far more advanced devices than PIC16, particularly when it comes to addressing.

Brian.
 
Solution
Right, thanks!
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…