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.

Assembly codes for PICs - question in bank memory changes

Status
Not open for further replies.

boncker

Member level 2
Member level 2
Joined
Dec 9, 2006
Messages
51
Helped
3
Reputation
6
Reaction score
1
Trophy points
1,288
Location
Brazil
Activity points
1,610
Guys,
In the MPLAB software, the disassembler function (from C to assembler) you can see the own code, but instead of register names you will see the register address. If I do some code directly in assembly to use in the PIC 16F877A for example (it has 4 memory banks), I need to use the STATUS register to change the bank.
If I write the assembly code putting the register address instead of register name, will be necessary to modify STATUS's RP1/RP0 to change the memory banks?

Thanks!
 

Re: Assembly codes for PICs - question in bank memory change

Yes, it will be necesary.

Names are the same as address, they are just for human confort(if there is any)

It is all about instrucctions, they just work with the active bank. That's why mplab wanings tell you to beware of bank changes whenever it sees an register (name or adfdress) from a high bank

So if you hate so much cahngin banks you coud use indirect addressing trough FSR register.

You can also program using a C compiler and you can forget all about banks, but you will have others things to learn and worry about
 

    boncker

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top