whether the vars are in the same bank or not is irrelevant with indirect addressing, the point is that with pic18 chips an array can be more than 255 bytes in length and may cross a bank boundary. ...
Thanks for the insight! I ended up putting all the variables used in the ISR in bank 3 and starting the interrupt with "banksel _ppm_n" in case I every move them to a different bank. I may not need...
The Access Bank consists of the first 96 bytes of memory(00h-5Fh) so if you create your asm vars in that space you can use the opcode access field rather than needing to switch banks
Thank you for your feedback! The test code seems to work ok, but when I roll this ISR into my main program, it could occur at any time so it seems setting the correct bank would be important.
...
looks close but if the vars used in asm are not in access ram you still need to ensure the correct bank is set, it may look likes it works depending on where the compiler places your vars but its ...
18F2580 with strange behaviour when using Hserin and RX interrupt
Hi guys,
PaulMaker Today, 16:48I'm facing a weird behaviour with my 18F2580 using Hserin and RX interrupts and I was hoping someone could help.
I'm trying to run a code that when an incoming 2 characters is...