James Hillman wrote: > Is there any reason why you can't do what I have done below ? This is based > on a write routine I wrote last week. I haven't had any problems with it, > but maybe I've been lucky ?? > > Instead of polling PIR1,EEIF you poll EECON1,WR which is cleared (according > to data sheet DS40300B) at the completion of the write cycle. This saves a > couple of bank switches and clearing of EEIF bit instructions. None at all. That's the method I normally use for the reasons you mention. I reserve the EEIF flag for use with interrupt routines, which is what it is there for. -- Best regards Tony mICros http://www.bubblesoftonline.com mailto:sales@bubblesoftonline.com -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu