>For some reason, my interrupts have stopped working. > >I think it's something to do with Program memory bank 1 - my code's >gotten to the stage where I've had to start dumping routines into the >second bank - calling them from the first bank. > >When I call a routine in bank 1 and loop there waiting for an interrupt >driven timer to time out, it never does - it just goes round and round >the loop. The SCI interrupt and the keyboard interrupt don't work >either. snip >I'm saving context ok in the interrupt (W,Status,FSR and PCLATH) - and >in fact the interrupt code never seems to get run at all (I put a port >flag in to check and it never gets set) One idea: do you do something like: org 04 goto interrupt If so, the goto is the problem... pclath is pointing to ROM Pg1 and you jump to somewhere not intended. The way that I handle it is to put all the context saving stuff right at the start as follows: ORG 00H goto COLDBOOT ORG 04H ;save W, STATUS, PCLATH, FSR movwf W_SAVE ;save w (could be on either ram page) movfw STATUS ;status register now trashed clrf STATUS ;ensure ram page 0 movwf S_SAVE ;good copy of status register in Page 0 movfw PCLATH ;remember to also save FSR if necessary movwf P_SAVE clrf PCLATH ;ensure ROM page 0 ;which interrupt? Parse interrupt flags here to reduce jumps (and time) btfsc INTF ;RB0 interrupt? goto RB0_ISR btfss T0IF ;timer 0 interrupt? goto TMR0_ISR goto INT_END ;this shouldn't happen! ;jump tables live here ;interrupt routines live here