For the sake of clarity, LAT was not really doing the same thing as BSR. What it was doing was causing PBP to change banks to BANK7, therefore PBP also changed banks back to BANK0 when the LAT was done. With it remed, PBP assumed it was still in BANK0. SO when I entered the ISR with a different bank set, PBP didn't know. I gather from Darrels help in my "bug" thread, He tends to the BSR=0 in his DT_INT routine to avoid just such issues.
BTW, the only reason I can change BSR inside my ISR is because 16F1xxx automatically saves BSR upon entering an interupt. So BSR will change back when I return. Otherwise I would have needed to save the BSR to a temp, then restore it before leaving ISR.
Next up on the list of games is multiple interupts and checking who fired.![]()
This is great fun!!!





Bookmarks