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

Dragnovith

Junior Member level 1
Joined
Apr 17, 2021
Messages
17
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
103
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.

betwixt

Super Moderator
Staff member
Joined
Jul 4, 2009
Messages
15,163
Helped
4,947
Reputation
9,915
Reaction score
4,761
Trophy points
1,393
Location
Aberdyfi, West Wales, UK
Activity points
128,815
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

Dragnovith

Junior Member level 1
Joined
Apr 17, 2021
Messages
17
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
103
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!
 

LaTeX Commands Quick-Menu:

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top