
Menuas an example this is what i came up with for your first question
#CONFIG
CONFIG FOSC=INTIO67, FCMEN=OFF, IESO=OFF, PWRT=OFF, BOREN=SBORDIS, BORV=18
CONFIG WDTEN=ON, WDTPS=512,...
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. ...
richard Today, 00:44
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...
achilles03 Yesterday, 21:11
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
eg
ppm_n...
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 ...
richard Yesterday, 00:16
I might have figured it out. It looks like I wasn't loading the full pointer into FSR0 since it's a 12-bit pointer. Also I hit on the POSTINC0 option, which is nifty. I believe the ISR should be...
achilles03 - 12th February 2026, 20:58
I have a couple interrupt routines using DT's instant interrupts in PBP that I'd like to convert to asm to reduce execution time. One of the ISRs uses an external interrupt to time pulses and store...
achilles03 - 12th February 2026, 18:10

Re: Converting PBP interrupt to ASM - 18F25K20
maybe like this
richard Today, 06:10https://youtu.be/PQrvgA-w0gk
steps through an array to set portb pin and another array to set timer interval for next interrupt , repeats every 6th pass
ra0 toggles every...