On Sat, 16 Feb 2002 20:52:25 -0800, Nick Masluk wrote: >Nope, that doesn't seem to be it. I added the >following code to the end of all places where the >EEPROM is written to, and it always ends up in a WDT >time-out. > > btfss PIR1, EEIF > goto $-1 > bcf PIR1, EEIF > >I think this may not have been working because it is >an interrupt flag, and I have all interrupts disabled, >therefor the flag may be inactive. That appears to be the correct code sequence. Are you sure that you're in the right bank when it's executed. It's really easy to be in the wrong bank and not know it. (The errors in examples 13-1 and 13-3 don't help.) Interrupt flag bits still work regardless of the interrupt enable state. They just don't generate the interrupt when they're disabled (or when GIE or PEIE is clear). Figure 14-16 shows this pretty well. If you would be willing to email your code off-list, I can run it on a breadboard I've got and try to duplicate your results. >And if clearing >the EEIF flag was such an important part in properly >writing to the EEPROM I would like to think that more >mention to it would have been made than in that small >section of 13.2. > Nothing ever surprises me about Microchip documentation anymore. :=3D) At least they've got it in there somewhere. Regards, Bob -- 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