Tony, Thanks for the additional advice. I was trying to reduce the text in my = e-mail and didn't mention the CLRWDT command. The device is now working fine, thanks to all the help from this forum. = The problem was not switching banks to the PIE1 register. I can now move on to developing the next exciting section of = code....!!!! Malcolm ----- Original Message -----=20 From: Tony Nixon=20 To: PICLIST@MITVMA.MIT.EDU=20 Sent: Wednesday, June 20, 2001 12:54 AM Subject: Re: [PIC]: 16F876 Interrupts Malcolm Peill wrote: > > David, > > This is a more detailed section of my code. > All code outside the interrupt routine finishes long before the next = interrupt, and just hangs around a loop waiting, hence no need to store = registers. > > Running the code below works, just polling TMR1IF, and updates my = display (shown in red) > > If however I enable the code in blue (enabling interrupts) and = comment out code in red, replacing it with a "loop goto loop" statement, = my display is never updated (but should be if interrupts were being = called) This does not clear the WDT... Loop goto Loop Loop clrwdt goto Loop You say that the TMR1 interval is 0.5S which may be causing WDT = resets. > i.e. 3036 to give .5sec interval including prescaler As you say you don't need to save W etc in your ISR in this case, but you do if you enable the other section of your main code because W and STATUS may be changing.... > call updatedisplay Does this subroutine take longer to execute than the WDT period? -- Best regards Tony mICros http://www.bubblesoftonline.com mailto:sales@bubblesoftonline.com -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu