I attached it on a reply. I had forgotten. And, yes I reset the flag. KreAture ----- Original Message ----- From: "Olin Lathrop" To: Sent: Tuesday, June 10, 2003 2:35 PM Subject: Re: [PIC]: 16F628 and interrupt problem... > > Anyways... I have a problem getting some simple test-code to work with > > the 16F628. > > Code uses: > > - PWM (Timer2) (Out on RB3) > > - Timer0 for a measure > > - Interrupt on RB0(INT) > > > > I don't see anything I have forgotten and still, interrupt only > > triggers on first pulse after power-on/reset. > > (Pulse being sendt via ripple-free switch connected to +5v and pin is > > pulled low via 1k for testing...) > > By the way, there was nothing attached. > > Did you remember to clear the interrupt condition in the interrupt > routine? You have to clear the INTF bit in INTCON in order to get a new > INT interrupt. Otherwise there will be an infinite loop where the > interrupt routine gets called again immediately after the RETFIE > instruction. > > > ***************************************************************** > Embed Inc, embedded system specialists in Littleton Massachusetts > (978) 742-9014, http://www.embedinc.com > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu > -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu