Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

BRA command in PIC16F877A

Status
Not open for further replies.

Dragnovith

Junior Member level 1
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
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.
Right, thanks!
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top