when PBP sees the LATF line, it switches to bank 7. when its done it automaticlly switches back to BANK 0. This way PBP can know it is always in BANK 0. So when it sees PIR1.1=0, this is a BANK 0 thing, it assumes it is in BANK 0 so it doesn't reset BSR. Now sometimes when my ISR is called, I was already in BANK 5. If the LATF line is in, PBP switches to 7, then back to 0 when done with LATF. When I rem LATF and enter the ISR in BANK 5, PBP doesn't know. So then everything that is supposed to happen in BANK 0 can't.
Adding BSR=0 as the first line in my ISR will ensure PBP won't be confused. Because the chip I am using does auto context save and restore, I don't need to worry about destroying the BSR in my ISR.
Bookmarks