I have some trouble understanding bank access on a PIC18F8722. More specific the "a" bit in an instruction. Can I just set the "a" bit to 0 and not bother with bank selection? Does this apply for the GPRs (60h to F5Fh) only? Or can I access the other registers as well?
I'm wondering because I don't want to have to keep track of which bank the registers are placed in. On the PIC16F628 that I have been using up until now, I only had to use data from Bank1 on rare occasions. On the PIC18F I will have to use a large number of GPRs, and it would be a pita to keep track of it all.
I'm using MPasm for compiling and I only program in assembly. I have written several routines for the 16F628A for SD cards and FAT16 file systems. Now I will have to move on to the 18F series for faster speeds and a better instruction set. Are there any tips and tricks I can use that MPasm understands?
Thanks for your help.
I believe I have figured out how it works.
Address 0h to 60h is Access RAM and can be reached no matter what bank you are in through the "a" bit. The same goes for address F60h to FFFh though these are used for the SFRs.
So all the data I need to share between banks should be placed in the first 96 registers for easy access. Tidy. Did a couple tests to see if the PIC18 Simulator can catch this, but it seems like it doesnt care too much.