Here's something I forgot to mention - the code uses TMR1 in "Oscillator" mode, i.e. it uses a 32kHz crystal to generate the TMR1 clock signal. This is done using - rather predictably - RB6 and RB7. Could this be the cause of all this trouble? I certainly didn't expect XWisp to die the way it did - surely it should have ignored the PIC's device ID, forced the PIC into PGM mode and programmed it as if it were a 16F628 (because that's what I specified on the command line)? Thanks. -- Phil. | Acorn Risc PC600 Mk3, SA202, 64MB, 6GB, philpem@dsl.pipex.com | ViewFinder, Ethernet (Acorn AEH62), http://www.philpem.dsl.pipex.com/ | 8xCD, framegrabber, Teletext ... The current limits placed are based on resistance -- 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