Tom Messenger wrote: > I have code that uses 2 interrupt sources: the INT pin (RB.0) and > timer1 overflow interrupt. If I toggle pin RB.0, I get an interrupt > and it does the correct thing. But when timer1 overflows, the > overflow interrupt flag gets set but the code does not vector to the > interrupt routine. > > Not sure why, I stripped the code down to about 10 lines and ran it > through the MPLAB sim. Same operation. I have the following code: > > [code snipped] > > Anyone have any ideas on why my code does not go to the interrupt > routine on timer 1 overflow? Tom: Somewhere in the Timer1 section of your datasheet is a table called "Registers Associated with Timer 1"; if you look at that table, you'll see that the PEIE bit (in the INTCON register) is used by Timer1. If you then track down the INTCON description, you'll see that PEIE enables "peripheral interrupts" like TMR1IF. You need to add a "BSF INTCON,PEIE" instruction to your code. -Andy === Andrew Warren --- aiw@cypress.com === IPD Systems Engineering, CYSD === Cypress Semiconductor Corporation === === Opinions expressed above do not === necessarily represent those of === Cypress Semiconductor Corporation -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body