> -----Original Message----- > From: Carl Rouse [SMTP:Carl@VERSATILETECHNOLOGY.COM.AU] > Sent: Monday, September 25, 2000 9:08 AM > To: PICLIST@MITVMA.MIT.EDU > Subject: [PIC]: '873 problem, was: '873 interrupts when disabled > > An update on my problem: as Tom Cwikla pointed out on comp.arch.embedded, > it can't be an interrupt as when I query INTCON in my ISR it shows GIE is > set and when an interrupt is thrown GIE is cleared by the hardware. So > there must be something else at work here. I've already posted the bulk > of > my source to the list but I missed this bit, and it appears to be the > culprit, even though I can't see anything wrong with it. When I call this > routine I end up in the ISR. It is a simple compound loop which is > supposed > to take W as it's only input and delay for approximately W x 1 ms. > > delayWms > movwf delaycounter_ms > movlw 0xa6 > movwf delaycounter2 > movlw 0x0a > movwf delaycounter3 > delaymsloop > decfsz delaycounter2, F > goto delaymsloop > movlw 0xa6 > movwf delaycounter2 > decfsz delaycounter3, F > goto delaymsloop > movlw 0x0a > movwf delaycounter3 > movlw 0xa6 > movwf delaycounter2 > decfsz delaycounter_ms, F > goto delaymsloop > return > > I hope someone can point to a problem with this.... my code obviously fits > in 1 bank, though it may extend across multiple pages. I've never had to > cross a bank boundary yet with my code (will have to soon) but I've > nearly > filled a bank with no ill effects, so if anyone has information about page > and bank boundaries I'd certainly be interested (gotchas that aren't > obvious > from the literature, don't want to waste list members' time) > > Thank you all, > -Carl > One to check is make sure that you haven't accidently EQUated or DEFINEd one the the delay variables to something important. like PCL or PCLATH. Cheers Mike -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics