Tamas Rudnai wrote: >> The odd thing is the delay routine that's playing up works perfectly >> when I move it closer to the front of the code. Then the routine(s) at >> the end go west. It's as if no routine itself is faulty, but the >> execution is! >> > > So it was not the case with the PCLATH thingy? > > BTW: Is not it OSCCAL value at 7FF? Your programmer might not even let you > place a code over there to avoid overwriting the OSCCAL value like that. Try > to put this diagnostic sniplet before - like turn on a pin and "goto $" > would do as it 'should not be happen'. > Good point. I'd forgotten about the trim for the internal RC in this chip. I just added a diagnostic pin BSF (and wait loop) at 0x7f0 and it still resets. David... -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist