First, enable portb change interrupts in your 'init' routine: bsf INTCON, RBIE ; enable portb change interrupt bsf INTCON,GIE ; enable global interrupt Now at the end of your code include this: intH CODE 0x08 ; high priority GOTO button =20 intL CODE 0x18 ; low priority GOTO button So now your 'button' routine will manage the interrupt. In your 'button' routine read the contents of PORTB to ensure the change on PORTB was because your button is pressed, do whatever you want, and return with 'retfie' instead of 'return'. Finally, in your 'loop' routine erase the call to 'button': loop call show ; displayed time goto loop Hope this helps, Carlos Ojea -----Original Message----- From: =C5ke Neehr To: PICLIST@MITVMA.MIT.EDU Date: lunes 28 de enero de 2002 18:38 Subject: [PIC]: Interruptroutine =20 =20 Hello PIClisters! =20 Can anyone be kind to help me with to put in a interruptroutine in this code so the printout will works even if you push the button again before the print=20 and decode routine is finished.=20 Now I have to wait to this routine is finished before the pushbutton will works! =20 Kind regards =20 =C5keN -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.