Having spent nearly the last 2 days debugging my 16f877 application I finally found the problem. I ported code to read/write to the eeprom from a previous 16f628 application, not realising that you have to specify whether you are reading the data memory or the program memory with EECON1,EEPGD. This resulted in the code working fine for 3 months on breadboard, but not so once installed in a pcb, and the most obtuse bug chase I've ever done. Hope this is of help to someone... James -- 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